Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / Languages / C#4.0

C#4.0

C#4.0

Great Reads

by Anurag Prajesh
Add new user registeration information in XML with C#
by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation
by Nirosh
This tutorial is designed for .NET programmers who need to understand ‘Nido’ framework and its application.
by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.

Latest Articles

by Anurag Prajesh
Add new user registeration information in XML with C#
by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation
by Nirosh
This tutorial is designed for .NET programmers who need to understand ‘Nido’ framework and its application.
by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.

All Articles

Sort by Score

C#4.0 

by Anurag Prajesh
Add new user registeration information in XML with C#
by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation
by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
by Sarang Date
Any string input can have these many possible states1) String is null2) String is empty3) String contains nothing but white space4) String has some contentTill now, .NET had static method for stringbool string.IsNullOrEmpty()which handled first two conditions for...
by jfriedman
public static class StringExtensions { public static bool IsNullOrWhitespace(this string s) { if (null == s) return true; return string.IsNullOrEmpty(s.Trim()); } }
by Peter T. Ringering
A program that makes editing code comments and XML comments easier.
by Yaseer Mumtaz
.NET interview questions and answers with real world examples and code snippets
by emadns
A basic tutorial for ReportMax tool
by emadns
Using the Chart control in ReportMax
by Nikita D. Sinelnikov
HowTo: make the report background (elements) of Microsoft .NET Report (.rdlc) non-printable
by Muthu Nadar
This article will explain about null coalescing operator along with its advantage and disadvantage.
by JatinKhimani
Develop a web application in 3 layer architecture code style
by AnobikDey
A description of how images and other controls can be rotated and used to give 3d Effect in Windows Store Apps
by Prasanna Venkatesh . K
Writing a Windows store background app from the scratch
by Jeong, WonYoung(Brad)
Making BitField with C# alternative to BitField made with union and struct of C++
by SrikantSahu
This is a simple application developed using C# MVC and jquery for basic CRUD operations. The application can be unit tested using selenium web drivers.
by Sambhav Yadav - Sam D Silva
ASP.NET page/master page/user control's life cycle from the perspective of Session and View State
by Mohammad A Rahman
by Ian Good
A possibly simpler version of this is to create an extension method for strings:public static class MyExtensions{ public static TEnum ParseEnum(this string value, bool ignoreCase = false) where TEnum : struct { TEnum tenumResult; ...
by Mohammad A Rahman
The ParseEnum method will not work where we use a version below .NET Framework 4.0 because of the TryParse method. So those who need to use it in below .NET Framework 4.0 or in .NET Framework 4.0, the following extension methods will be helpful:public static TEnum ParseEnum(this...
by shijo joseph
A file backup manager with simple user interface and all the essential functionalities.
by RickZeeland
An easy way to edit and exchange XML config settings
by Jarno Burger
A managed wrapper around FreeFrame, to give your video frames some cool effects
by Michael Bergman
Using Windows Communication Foundation to build a simple web server
by Marlon Hizole
An elegant approach to pagination
by ryowu
A game that shows how to use C# drawing and how to create 2D anime.
by shijo joseph
An easy to implement yet powerful logging library which requires absolute zero learning curve
by UberGeoff
This tip explains how to display a jQuery modal pop-up message using server side events.
by David A. Gray
The routines in this library can parse any string that I can throw at it, including Common Name strings read from X.509 Digital Certificates.
by bluecurve01
How to parse robots.txt and robots meta tag
by Member 626383
Using grid and search grid using Ajax or without Ajax, and using Resource Files to enable multi language support
by LLLLGGGG
A really simple implementation of a C# menu for console applications
by Erik Vullings
Generate a PowerPoint presentation, consisting of slides with a title and an image, without requiring Microsoft Office
by B. Clay Shannon
A C# snippet that converts Spanish text into a phonetic representation of how to pronounce it (in Mexican Spanish, not Spaniard Spanish) for speakers of American English
by Sen Jacob
A simple task scheduler utility by which you can schedule a task to run at any time or interval
by Sen Jacob
This is an alternative for "A Task Scheduler Library for .NET Applications"
by Prakash Lekhak
This article describes how to access master page control from content page.
by babu saravanan
This article explains how to retrieve TFS 2010 project check in details from C#.NET code
by pckola
Accessing userProxy, userProxyFull From AD Light Weight Directory Services
by Ramanujam Shankar
Show data in grid view control of Windows Stores App using web service or WCF
by gunjan k saxena
This tip will help to create an action filter to compress the contents like Json, partial view, etc.
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Ever wondered how to add HTML file contents to the aspx page by code. Take a look at the implementation.
by Monjurul Habib
How to add namespaces for Razor pages
by Douglas de Alvarenga Silva
Add-in Word for PrintScreen
by Redslide
Modify MVC Routing to allow routes such as /Electronics/Software/Operating-Systems/PC/Windows-8-Installer
by MarkLTX
Automatically implement INotifyPropertyChanged for every property in Entity Framework 6.0 entity classes
by E.F. Nijboer
ExcelDataReaderHelper: Functionality similar to LinqToExcel using the ExcelDataReader package
by #realJSOP
Evaluating epressions in an ad-hoc condition.
by Andrew Rissing
This is an alternative for "Ad-Hoc Expression Evaluation"
by Mr.PoorEnglish
This is an alternative for "C# Sprintf-Lite"
by DaveyM69
Now your application can update it's saved data regrdless of the account it is running under.
by Reto Ravasio
Howto Paste and not make a mess
by Callum Linington (UK)
My way of diminishing the need to write out all those angular script files
by Bert O Neill
AngularJS and Web API Active Directory Security (Authorisation)
by Yaseer Mumtaz
AngularJS ng-grid export to CSV workaround for Internet Explorer to avoid showing "Save" dialog box.
by Yossi Yaari
A basic yet generic state machine implementation
by Ahmad F Hassan
An easy way to view hierarchical data in a simple ASP .NET Repeater
by Ruhollah Heidarpour
Just another ASP.NET Persian(Jalali/Shamsi/Solar) / Gregorian Datepicker
by Mikhail Vasilchenko
ASP.NET MVC 5 Multiple Image Uploader with Crop
by Luis Manuel Prospero Mano Batista
ASP.NET MVC 5 SignalR, SqlDependency and EntityFramework 6
by BalaG Ganesan
ASP.NET MVC4 - Bundling and Minification
by nasir_ml
ASP.NET textbox validation made easy.
by aamir sajjad
How to implement the custom authorization and exception handling attribute in the ASP.NET Web API.
by Super Lloyd
Show how to make OData code async friendly
by John Pravin
Asynchronous Programming with Task Parallel Library.
by DaveyM69
How to have a real console window as well as your forms
by johannesnestler
Very good tip. I just want to mention an alternative - you can just change your project output type to a console application. (You can undo it later if only needed for debugging). So if you started with a Windows Forms project in Visual Studio: Go to project properties/application/ and in the...
by fastal
VB version:Friend Declare Function AllocConsole Lib "kernel32.dll" () As BooleanFriend Declare Function FreeConsole Lib "kernel32.dll" () As BooleanSub main() Dim MainForm As New frmMain If Command = "" Then MsgBox1 = AddressOf MyMsgBox1 ' messagebox delegate sub call...
by Andreas Gieriet
To not having spoiled the client code with #if DEBUG, you might use the following:[STAThread]static void Main(){ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); try { Debugging.DebugSetupConsole(); ...
by deepaktripathi
Using auto complete textbox in jQuery Tabs content via AJAX in an Microsoft MVC project.
by Emiliano El Mariachi
Here is a small library to help you have an automatic undo/redo feature without explicit dependency on Undo/Redo system.
by Amin Esmaeily
In this tip, I will explain how to create a simple user control (AverageMeter) using WPF.
by Mukesh Pr@sad
This tip describes how to build an application in Azure Cloud with ASP.NET MVC and WCF.
by ankit57100
Azure Notificationhub - Sending Push notification to mobile devices
by ROHIT SHAW
It shows how to display a badge notification in Windows 8 metro app
by DaveyM69
A few quick examples of how to correctly create events.
by Kundan Singh Chouhan
Simplest, best and most robust architecture.
by CoperNick
How suprising can be conversion of decimals to bytes in C#
by Nirav Prabtani
Bind gridview using Ajax post method and jQuery
by manchanx
Tidy, generic solution to bind Enums (with or without a DescriptionAttribute) to a ComboBox or other Controls
by Amit_Mittal
An easy way to bind XAML with properties defined in code behind
by Houssem_Dellai
Using Bing Maps in Windows Phone 7
by Enrico Zerilli
Custom Pipeline that backs up incoming message to folders retrieve from external DB
by RobLazarus
This books is a tour de force and a must-have for any ASP.NET MVC developer as it will save you hours of time and frustration researching solutions to the various questions you may encounter when using MVC 4.
by Oleksandr Kulchytskyi
This tip explains how to increase performance in serialization by using MessagePack
by Kishor Deshpande
Reduces line of code by writing builder methods to construct integration test queries.
by blitzkrieged
An alternative ProgressBar for C# with extra functionality
by charles922
Program that continuously monitors the NXT via Bluetooth
by Sameera Millavithanachchi
This is a custom mapper which can be used to map two objects instead of automapper
by Maddog Mike B
A message server using named pipes and the Async CTP library (async and await keywords)
by Be with technology
This is a simple program which demonstrates how we can change the proxy settings programmatically.
by Amir Dashti
A simple but powerful class to simplify packet based networking and client/server programming asynchronously
by Sympletech
A simple utility to help convert strings into other types
by Virender Prajapati
Shutdown, restart, logoff, lock, sleep, hibernate windows using C# and WPF
by Brad Joss
Smart phones all seem to geo tag (add GPS details) to the photos they take. However, after you copy that photo to your PC it is difficult to see, in human terms, where that photo was taken. This project parses the photo for the GPS data and opens that location on a map.
by Michele Ziparo
An effective way to implement a caching system in Silverlight (MVVM) RIA
by Michele Ziparo
An effective way to implement a caching system in Silverlight (MVVM) RIA
by Houssem Dellai
Developing a Windows Phone app step by step
by Arjun Singh Faguda
How to call cross domain Webserver(asmx) service from jquery and bind the Json result with Jqgrid
by Vishal_Kumar
Call server side code using ASP.NET AJAX and jQuery AJAX
by arnavs
How to call a console application from the web on button click.
by SibeeshKV
Calling an ASMX webservice from other server using jquery and PHP
by Ankur .K. Vishwakarma
Calling server-side code from client-side using JavaScript and TextBox's onblur event
by Kaveh Yazdi Nezhad
A simple solution to capture entire HTML code of a web page which is displaying on Internet Explorer
by Madhav Hatwalne
Caution when you are disabling a checkbox in Edit View
by DaveyM69
How to prevent a CD/DVD drive from being opened.
by Steve Maier
To get this to work in .NET 4, you have to change the DLLImport signature.[DllImport("kernel32.dll", SetLastError = true)]private static extern IntPtr CreateFile( string lpFileName, uint dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, ...
by A. Najafzadeh
This tip shows how to change LINQ-to-SQL connection string at runtime via programming.
by C Yang
Program to Switch Screen Setting In One Click
by DaveyM69
How to access a control from a different thread + good alternatives by other members!
by AspDotNetDev
This version works regardless of parameters:public void AnyMethod(int parameter){ MethodInvoker wrapper = new MethodInvoker(delegate() { // Do your thing here! }); if (this.InvokeRequired) this.Invoke(wrapper); else wrapper();}Note also...
by Moim Hossain
Doing like following for few years now :public void AnyMethod(int parameter){ var wrapper = new Action(()=> { // Do your thing here! }); if (this.InvokeRequired) this.Invoke(wrapper); else wrapper();}
by Surjit Singh Dadhwal
This post will help you to resolve problem of checking maxlength of Multiline textbox (Internet Explorer, Chrome & Firefox)
by Manjeet_Singh
Using CKEditor in ASP.NET without using AJAX assembly files.
by Shriniwas Shukla
CLR is not allowed managed code to catch access violations and other corrupted state exceptions
by kabdolla
Create your own keyboards, keypads/ virtual buttons on top of other windows; filter unwanted input.
by B.O.B.
A simple extension to add an item that has a data source bound to combobox.items
by Anshul R
Shortcut for Commenting
by Abhishek Sur
It is to be noted, .NET has lately introducedResponse.RedirectParmanent() after a long await. The main motive of this is tohave permanent response redirection to the Search Engines.Response.RedirectParmanent() is an extension function introduced in .NET 4.0.Themain motive of it is to indicate
by KK Kod
How to compress JavaScript and CSS files in a web application to reduce page loading time, using GZIP.
by Tyronne Thomas
Connecting to a C# socket with a timeout.
by starbug8866
An example of how to authenticate and connect to Power BI REST API when no user is present / from a service
by Sandeep Singh Shekhawat
This tip is about the Constructor Dependency Injection Pattern Implementation in C#.
by Faisal(mfrony)
Understand why we need Contravariance in C#.
by manish31383
How to do controlled ThreadPooling using .NET Framework 4.0.
by Anshul R
The Perfect Translation/Conversion of Code
by Sibeesh Passion
Convert CellSet to HTML Table, and from HTML to Json, Array
by El_Codero
Convert doc/docx documents to pdf with Foxit Reader Printer. Works without use of Word Interop/SharePoint.
by Tapas Ranjan Singh
This tip will help in understanding the directory and file dialog box, the progressbar control, and image conversion.
by RickZeeland
This console application converts an SQL Server database to PostgreSQL.
by RemcoReitsma
Load an XML document and convert it to a dynamic object
by Bryan Lyman
A method for duplicating a web page (including all scripts and styles) to run as if it originated from your own server, then modify server-side and client-side functionality afterwards.
by #realJSOP
If at all possible, never give your code the opportunity to fail. If there's any possibility at all that you can prevent an error condition from being raised, do it. try{ if (!string.IsNullOrEmpty(FileName)) { string newPath = System.IO.Path.Combine(FilePath,...
by Faisal(mfrony)
Understand the use of covariance in .NET 4.0
by Tyronne Thomas
CPU usage with C#.
by Gold$Coin
This tip will help you to create a collection from a DataSet
by SuhasHaridas
Create Linq to SQL connection with select, insert, delete, update
by User 8388951
In this tip, we are going to create an activity that can send an e-mail message to a target user.
by Prakash Lekhak
We will create a Table and Stored Procedure in Sql Server 2008R2 and data will be inserted and retrieved by using Asp.net using C#
by Sunil_Pawar
Learn how quickly you can Create, Run, Debug and Deploy SQL CLR function using integrated features of Visual Studio 2013.
by Sujith Karivelil
Creating a link in the left pane of the file Explorer - like OneDrive or DropBox
by Vaibhav M Nalwad
How to create dynamic instances using custom attributes with constructor values
by Carlos Conceição
This article how you can use TextToCalcExpression to generate Linq Expressions in runtime
by Member 10298658
The ConcurrentDictionary type resides in System.Collections.Concurrent, introduced in .NET 4.0. It makes adding, removing and updating values in a lookup table on multiple threads easier.
by Israel Gebreselassie
This tip/trick shows you how to edit the web.config file dynamically .
by D Sarthi Maheshwari
A suggested solution to create Partition based Dictionary (reducing chances of OOM errors and adding capability to hold bigger KVP set in Dictionary).
by Md Ashaduzzaman
Here we’ll learn how to create a page template of our own that is reusable.
by Indresh_Prajapati
This tip will help beginners to implement CRUD operations in ASP.NET MVC 4 with scripting language as KnockOut and Database as MS SQL 2008R2.
by Mik Wadstrom
Simple way to use Crystal reports as embedded dynamic printable reports
by Shailendra Singh Deol
Create Custom Message Box in WPF XAML
by Aliaa Ezzat
Custom paging control for repeaters
by HardikPatel.SE
Paging using AJAX
by HardikPatel.SE
Paging and Sorting with AJAX
by tumbledDown2earth
Using dynamic or ExpandoObject is a breeze to dynamic data WebAPIs, but when serializing to XML, it can cause a brain damage sometimes :)
by Daniel Lo Nigro
Custom strongly typed HtmlHelpers in ASP.NET MVC
by DaveyM69
Enables access to the original argument in all events
by rakeshcodeproj
Show the Awareness/Notification Modal dialog based on the cookie and display the content from a list with a single java script file
by Gihan Liyanage
Simple Dapper.NET Example with MVC
by Raja.Krishnasamy
Data Driven Testing in MSTest by using Excel as data source and Named Region as table name instead of sheet name
by Monotosh Roy Mon
XML Serialization & Deserialization for converting our object to XML and XML to Object
by Umesh Khandelwal
Database project diff SQL script utility (using VSDBCMD).
by Ced743
DataGrid column separator
by Hassan Alrehamy
JSON Deserialization in depth concept and Dictionary mapping. Special Thanks to Dr. Coral Walker
by Aaron Amberman
Defer algorithms to run once within a given time span
by Markus Kühter
How to Delete Columns in a DataGridView
by Kanivalan Raju
Deserializing JSON to object without creating any custom class using C# Dynamic type
by JRCoderMan
Detects a double-click via an initial and subsequent OnMouseDown event
by Leri Buiglishvili
Little and programmer-friendly library for device recognition for mvc 4 web apps.
by Sandeep Singh Shekhawat
Here you will learn the difference between Response.Redirect() and Server.Transfer() Methods in ASP.NET
by bbirajdar
Difference between var and dynamic in C#
by AnthonyMG
WPF ComboBoxItem disabling
by Sonali Agarwal
Here I am showing the local time in various timezones in the world
by sarvesh.upadhyay
Dotnet Simple Rule Engine
by Chamara Janaka
Download Files Using Web-service
by Arnault Bonafos
ScrollBars improvement
by Florian Braun
This is another approach to dynamic compilation of objects and their usage via Interfaces.
by ambarishtv
dynamic keyword - Represents an object whose operations will be resolved at runtime
by Maninder Singh Puhi
Appropriate query to fetch required no of results from DB instead of getting all at on time for binding controls like Gridview, listview etc
by Thomas Corey
Dynamically sort query results using LINQ expressions and reflection.
by Thomas Corey
Dynamically sort query results using LINQ expressions and reflection with sorting
by kribo
Dynamic TabItems
by skantg
Dynamically create multiple web user controls and use them on a page
by Narendra Singh Rathore
Here, we are getting all/filtered images from our directory to our .aspx page
by Michael J Hill - OH
Create a Windows desktop app to display daily web stats from your personal site
by Dean Oliver
A performance tip for EF 4.1
by Amin Esmaeily
This trick is about how to effectively reduce reserved memory by process.
by Youqi Ma
Using a controller to manage dynamic control form events and creation.
by Kishan Zunjare
Configure different email provider sources using the Provider design pattern
by kennysun
encrypt all stored procedures in SQL server with powershell
by Preetam U Ramdhave
How to develop connection string encryption on the application config file.
by ModMa
Real and fully functional connection Database Provider and DatabaseTraceListener for SQLite!
by Soulus83
Unique constraints
by OrlandoCurioso
An EF base DbContext that provides detailed information on current and totalized changes
by Jana Sattainathan
There is an easier way to get the Oracle data source than custom-code a TNSNames.ora parser.
by onelopez
If enums' could be used OOP style.
by JatinKhimani
Export Gridview data in Excel formate with gridview design.
by Yuriy Anisimov
Expressmapper - lightweight, lighting fast and easy to use .NET mapper
by AmitGajjar
An efficient extended search API to search from a text file.
by Md Nazmoon Noor
by Kamran Behzad
You inspired me to contribute the DateTime extensions methods that I use in my programs. (But use at your own risk!). Thank you./// /// Date and Time Manager class./// public static class DateMan{ /// /// Returns the age in years for the given DOB...
by Kim Togo
Here is a methods that I use to round DateTime class to the next minute interval./// /// Rounds a date value to a given minute interval/// /// Original time value/// Number of minutes to round up or down...
by Kees van Spelde
How to extract embedded files from Microsoft Office documents
by Peter Boyall
Quick routine to extract keys from FederationMetaData.xml
by pavan1361
adding require blocking site in hosts file
by charles922
Another way to implement Falling Blocks Game
by ZamirF
Can we simplify it by: (This essentially passes only two numbers). public int GCD(int value1, int value2){ int max = 0; bool gcdFound = false; int counter = 1; //Make sure both numbers are atleast 2 or above if (( value1 <= 1 ) || (value2 <= 1)) return...
by jfriedman
/// /// Find the Greatest Common Divisor /// /// Number a /// Number b /// The greatest common Divisor public static long GCD(long a, long b) ...
by Mauro Leggieri
It is better to do this:public static long LCM(long a, long b){ return (a / GCD(a,b)) * b;}To avoid overflow on big numbers.
by Mohammad A Rahman
Few extension methods of String concatenation in C#
by AmitGajjar
Application for seaching similar kinds of files in different folders.
by sankarsan parida
This article describes how to show file name extensions, hidden folders/files, and system folders/files in your system.
by Philipp_Engelmann
Finding a valid flow in a flow network with minimum and maximum capacities
by Vahid_N
It's easy to forget not disposing object contexts, which leads to memory leaks and also leaves too many related connection objects not disposed as well.
by Morten Skaarup
Using recursive programming to solve the puzzle
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Want to select the GridViewRow without Select button showing on the row. Just follow the steps mentioned in the tip.
by dgDavidGreene
How to find and link config and other files from other projects within your solution.
by Yves Vaillancourt
Adding an extension method to LINQ to flatten any hierarchical collection
by Frantisek Ruzicka
Usage of my FontAwesome Image/Icon generator for WinForms
by Paul Schwartzberg
Formatting XML in a string for visual presentation.
by SubhamoyBurman
Use of Task Parallel Library and Async/Await in your application
by Pablo Oropin
This article aims to explains how to implement functions to deliver data via HTTP POST or HTTP GET in ASP.NET to an specified link.
by Søren Gullach
Fuzzy lib that have a GUI and uses Lagrange for member curve generating
by Oleksandr Kulchytskyi
Boost up your serialization in ASP.NET Web API.
by Steven.Pinto2000
Get GCD
by DrABELL
Hello Steven,As FYI: recently I have published on CodeProject a short article (tip) on rather efficient implementation of GCD/LCM based on Euclid algorithm. They use iteration instead of recursion, because re-cursive algorithms in general and in this particular case are relatively...
by sridharnetha
Binding autocomplete feature to a textbox dynamically using JQuery
by Rishikesh_Singh
Generate Insert script to extract data
by alrosan
One method to generate random text
by BrettPerry
A generic type web request serialingn json response
by DaveyM69
How to convert a generic List of derived types to a generic list of base types.
by vijay__p
How to perform CRUD operations using generic repository with EF pattern with and dependency injection.
by Kundan Singh Chouhan
Simple technique to handle text input and validations in single control
by DaveyM69
Starting a thread using a generic argument
by supercat9
Another approach is to use a generic delegate-factory class. Essentially, the class has a field of generic type, a delegate field which accepts an argument of that type, an parameterless instance method which accepts an argument of that type and invokes the delegate with it, and a static method...
by Philippe Bouteleux
How to instantiate a COM object wrapper and call a method at runtime
by VallarasuS
Here is how you can achieve Gradients used in Office 2010 Buttons with a glow at the bottom.
by adolfobarallobre
Here is code for an alternate:public class OfficeButton : Button{ public OfficeButton() : base() { } private Color mGradientGlowColorColor; // the Color field public Color GradientGlowColor // the Color property { get { return...
by Atyant Srivastava
Integration of Google map to Window Store App
by Manoj Kumar Chaudhari
Allows users to connect to Google spreadsheet(s) and convert them to CSV
by dietmar paul schoder
How to produce a dynamic lined or squared background on a canvas/grid
by Mithun Achar
GridView with DataPager in ASP.NET 4.0
by Rajamohan Dhanushkodi
Custom DataGrid than can group data, display row details, and filter data.
by Billy S Davis
Wouldn’t it be nice to call your AJAX method and just build a generic object to pass into the server side function, without having to create a bunch of complex server side objects?
by ryowu
A full functional Hanoi Tower game base on WPF
by Codes Of Shadows
Header Style Combo Box Drop Down Filter Button
by atlaste
How to fix hiding controls in the Visual Studio user control designer
by the retired
High performance C# byte array to hex string to byte array.
by Nadege Rouelle
by Dr. Vinayak Ashok Bharadi
Homomorphic filtering is a generalized technique for signal and image processing, involving a nonlinear mapping to a different domain in which linear filter techniques are applied, followed by mapping back to the original domain.
by coolnavjot31
In this Artcile i will show you how can we change the value of one column on change of other column in gridview.
by Abhay@Accenture
How to bind Derived Type in MVC View
by marks-mike
Demonstrates how to cascade delete on a single table that maintains hierarchy by a ParentId that points to the primary key of the same table
by CS1401
Using this method, we can clear the text stored in a textbox easily.
by Mohammad A Rahman
A generic text clear method for those ASP.NET controls which implement the ITextControl interface:private void Clear(ControlCollection controlCollection) where T : ITextControl{ if (controlCollection == null) return; ...
by kris444
We can better have an extension like: public static class ControlExtension { public static IList FindControlByName(this Control control) where T : Control { List controlsFound = new List(); controlsFound.AddRange(control.Controls.OfType()); ...
by tungnt185
This tip will show you how to create a WCF service return JSON use for mobile app.
by Siddharth A. Pavagadhi
Custom image validation method in MVC which is useful for validating images in web.
by Ed Nutting
How to fix LocalDB / SQL Server: "Cannot open database "XYZ" requested by the login. The login failed. Login failed for user ABC"
by KazMaxLtd
This article describes how to hide or show TabControl tabs at runtime
by Bernhard Hiller
That's far too obscure.All you need to do is store a reference to the TabPage instance which was removed from the TabPages collection of the TabControl. You may use the form where the TabControl is placed for that purpose.You could also create your own TabControl which has an extra property...
by Aydin Homay
In the tip, I want to illustrate how to host windows form in windows user control
by Leo Dungca
A simple tip on how to implement a custom IPrincipal in ASP.NET MVC 4 template project with WebMatrix.WebSecurity and OAuthWebSecurity.
by Amit Singh Baghel
Saving Details Table Data (An HTML Table) in Database by converting it into a jagged array and passing it to a table type parameter
by Azure Developer
Authentication ASP application using Office 365 User
by Mathi Mani
Parse delimited files having the delimiter being part of actual data, apart from acting as delimiter
by Ricardo R Carneiro
In this tip, I describe how to post/send data of a table (or list) of HTML for a LIST/ARRAY in C#.
by JoaoSousa23
Deploy an ASP.NET MVC application to a Azure Web Site by using the Publish Web Wizard in Visual Studio 2015
by HUONG Minh-Luong
This tip is a tutorial that explains how to use PresentationRequestor Nuget package.
by Rohan Kishor Garud
RoundhousE (RH) is a database migrations engine that uses plain old SQL Scripts to transition a database from one version to another.
by zheng shuo
This tip shows how to share data between two or more forms in a Winforms application.
by Kees van Spelde
To encrypt or not to encrypt with C# .NET
by BenScharbach
How-To Convert a String Collection to a Multi-Enum item using TryParse
by Arno1973
A fix for ImageButtons problem in IE10 when project is not 4.5
by Shine K Velayudhan
Why and How to implement KnownType Attribute in WCF Service
by JO Hyeong-Ryeol
An introduction to the WatchableObject that is a base class to implement the INotifyPropertyChanged interface.
by Yogesh Kumar Tyagi
This tip introduces how to Import data From Excel file to Data Table in ASP.NET MVC4
by Hernán Hegykozi
Versioning file inclusion JavaScript by date of last modification
by Ahsan Murshed
This article gives ideas to developers to increase development time productivity using the free Visual Studio 2010 extensions.
by Thorvaldur Arnarson
Abstract class inheritance inversion where in the base class calls the inheriting class.
by Debopam Pal
Export Advanced Excel 2007 Report
by Dhruti90
MVC functionalities with web service with simple integration
by Dhruti90
MVC functionalities with Web Service with simple integration
by Rohit Taralekar
This article gives you a basic idea about the new developer's API called SignalR.
by saephoed
A generic approach to aggregate return values of multicast functions.
by Evgeny Pereguda
This is simple implementation of fast forward 1D DCT-II on MSIL which is generated at runtime.
by Member 3531622
A tool like the object browser to browse the interface of documented JavaScript and JavaScript code snippets.
by user6790
Autocomplete feature of jQuery in a MVC 3 application.
by nileshwar shukla
Applying Minimum Spanning Tree using Kruskal in Graphs
by Kim Togo
Code to change text to Leet
by Luc Pattyn
This is an alternative to "L33t Tr4nsl4t0r (Leet Translator)".
by Kim Togo
I have tried to change the code with a good idea from Luc Pattyn (Thanks).The code is more compact, and I have tried to make the code more simple, that handles the degree selection.// Leet Translator - L33t Tr4nsl4t0r.// Version 2.//// Just for the fun.//using...
by Ashwin. Shetty
Lazy loading object in DI using Castle Windsor & System.Lazy
by thedavejay
What makes MVC great is the way it enforces code separation between the different layers of abstraction.
by furkanavcu
Implement the Levenshtein Edit Distance algorithm.
by dgDavidGreene
Helper utility replaces magic string property names.
by maximaximum
The article describes how to draw a grid of vertical and horizontal lines in WPF.
by Srinivasu Pemma
This tip provides an easy way of dealing with different types of data sources for LINQ Group By taken from my blog http://www.srinetinfo.com/2012/12/linq-group-by.html
by Pranay Rana
To understand how execution take place consider below code: //Query not going to execute at this pointvar query = from customer in db.Customers where customer.City == "Paris" select customer; Most of the people think that the query gets...
by Hiren Khirsaria
Mapping Stored Procedure with DBML to get multiple results from Stored Procedure
by d.ban
A LINQ tutorial for beginners.
by Andreas Gieriet
This is an alternative for "Sorting Strings based on the position of the block letter"
by Anand Gunasekaran
Listview Paging Feature to split the records of the listview in sevaral pages.
by Alex Wiese
Monitors log files and displays text as it is appended to the file
by |\/|ax
Localization by Build
by MarcusCole6833
A simple program to make an HTML page from an XML file
by FlyersWeb
This article present how to make async HTTP Request in a command line application
by santosh poojari
We can now set the URL querystring length in asp.net
by lampiclobe
An infinite number implementation with advanced division and modulus operators.
by RaviAakula
Web API 2- Basics of Attribute Routing
by Mehul M Thakkar
A library to minify HTML and CSS content.
by Yossi Yaari
A solution for monitoring Events called during test.
by User 468701
Task.Factory.StartNew can be very useful for executing a method on another thread where you don't care about the result, but it can also make the host method hard to test. This tip describes how to inject Task.Factory and mock it for testing.
by Mr. Tapan Kumar
This article describes how to modyfy the webconfig file of a SharePoint site
by LShep
This tip describes an IEnumerable extension method that allows you to select an item modulo Count()
by Pritam Deshmukh
This tip elaborates few useful tricks and shortcuts of VS 2013 mainly for professional edition (You can find them with Ultimate version too).
by Rahul.KumarSharma
Custom mouse double click helper class for Silverlight.
by Aaron Amberman
Mouse tracking and mouse binding.
by sluaghtered
Script Runner that can run multiple SQL script files on MS-SQL.
by Matus Kovacik
Single class encapsulating UDP IP multicasting functionality and exposing it via observer pattern.
by DrABELL
AsFYI: In addition to my previous comments, here is the link to an excellent article published by Aron Weiler on CodeProject addressing the same issue of Multi-Key Dictionary Object: C# Multi-key Generic Dictionary[^]
by Aron Weiler
Here's an alternative... use the original code (as posted by DrABELL) that I wrote years ago, instead of this plagiarized compiled crap.
by InbarBarkai
Create and use a multiple value slider
by Yaseer Mumtaz
MVC 4 Ajax File Upload Control - Workaround
by shivendra pratik
Convert an Empty Web Application to MVC Web Application using VS 2015 IDE
by lakhdarr
Using angularjs global controllers and MVC Razor to divide page (load) rendering between server and browser
by Paw Jershauge
Want your own movie database??? Download IMDB in 20 minutes.
by JatinKhimani
Nested GridView With Editing Facility of both gridview.
by azweepay
Create a GridViewColumnCollection with resizable and non-resizable columns
by Member 10163979
Implementing custom sort on numbers for Telerik's RadComboBox
by xibao
Code to produce holidays for NYC Stock Exchange.
by saddam abu ghaida
This post addresses the possibility to create any kind of object and fill it with random data based on properties data types to ease data creation and inserting it in the database in CRUD application.
by sajjad kardani moghadam
Octa Tree is a 3D space partitioning algorithm
by Andrei Keino
The tip describes a way to create C# enhanced enumerations that can contain class objects.
by taha bahraminezhad Jooneghani
Problem around .first() method in EF and a good solution
by PavyBez
OrderedLock in C# to catch potential deadlocks at runtime
by Saad_Mahmood
Parsing XML File in WindowsPhone in NO TIME Using BLEND for VS 2013
by josh-jw
This article will help you to create partial views in asp.net mvc 4 with razor.
by Tom Glick Philadelphia, US
POC to demonstrate passing of collections of complex objects to ASP.NET Web API Controllers.
by Mr. Tapan Kumar
In this article I will describe how to integrate paypal in your asp.net web application
by Aman Thakur
The tip explains how to make recurring payments using the Stored Credit Cards in the Paypal Vault.
by isenthil
How to play a sound in Windows Phone using media element
by Handy Torres
POCO to CAML simplifies creating of CAML queries by using expression trees.
by Super Lloyd
All the tools to calculate Distance to Bezier curve, find the root of Polynomial, do Complex math
by Member 8225284
The article shows how to populate a TreeView and maintain its state.
by Lance Roberts
A tray utility for monitoring log files and popping up error messages
by Thomas Daniels
A tip about how to set the position of a Windows Forms MessageBox in C#
by ednrg
This is a .NET port of a VBScript utility
by PIEBALDconsult
This is an alternative for "PrettyXML (.NET Port)"
by AnthonyMG
Tip for preventing deselection of rows in DataGridView
by shelby67
Dialog for product key entry
by Member 3531622
Get rid of trivial mapping between objects like mapping between obj1.City and obj2.Town or between properties with the same name
by AndrewSmith
Creating a custom base job class for quartz scheduler development
by _Noctis_
Showing how to use and tweak the DateTimePicker control
by Subha.N
Tip to create a database application using C# .NET in the shortest time possible.
by Indranil Pal
Helper for RadioList in MVC 4
by Alex Furmanski
You should watch out for cases where the return value could be null otherwise you'll get an exception, and your call to ToString is redundant.OracleClob clob = Params[3].Value as OracleClob;if (clob.IsNull) errorCode = null;else errorCode = clob.Value;
by Anupama Roy
Read clob from Oracle
by Kees van Spelde
Going on with a great article where another author left in 2010
by yousafzai amazai
ref and out parameters in C#
by saephoed
Passing event references as interfaces in C# by proxifying them within "EventReference" instances.
by Sonali Agarwal
ASP.NET RegularExpressionValidator
by ortund
Allow purchases via PayPal on your website
by linebenchmark
Remove all blank lines, containing or not spaces:^:b*$\n
by Ziv Nitzan
There is also a Visual Studio extention called CodeMaid that has a lot of cleaning options http://bit.ly/diMTaR
by Sumit Samediya
Here we will learn how to remove default background color of ListBox item on selection in Windows Universal App
by JatinKhimani
This tip provides the repeter paging with First and Last Page button
by RobertFall
I was struggling recently with a problem I KNEW had to be solvable in a much easier way than replacing ALL the fields in my managed entity by hand and then saving it. I wanted a way that I could simply replace the managed entity with a new one that had been created from an XML document.Turns...
by Rajdeep Debnath
Replace all HTML tags from text/string
by Massimiliano Peluso "WeDev Limited"
Repository Pattern with Entity Framework 4.1 and Code First
by Tyronne Thomas
Resolving a hostname in C#
by jseijas2
In this tip, we will see how you make quick REST API from database defining the API in a configuration file.
by Yogesh Gulve
Return Comma Separated String using SQL
by Nithila Shanmugananthan
Re-usability of view in MVC
by hemantwithu
How to reverse a string without using the Reverse function in C# and VB.
by Prerak Patel
What is new in this age old method? We can use LINQ too.Dim inputString As String = "Reverse me"Dim input() As Char = inputString.ToCharArrayDim result As String = New String((From i As Integer In Enumerable.Range(1, input.Length) _ Select...
by #realJSOP
I wouldn't create a class for this. I'd make it an extension method, and then do this:public static class String Extensions{ public static string Reverse(this string value) { value = // do your reverse code here; return value; }}// Usage:string x...
by Mohammad A Rahman
Another way,public static class ReverseStringExtension{ public static string Reverse(this string dataToRevese) { Func reverseFunc = (dataToFunc) => { StringBuilder reverseBuilder = new StringBuilder(); for (int index =...
by jfriedman
/// /// Reverses an array (Change the type or use SetItem)/// /// The bytes/// The index in the bytes/// The length of bytes to reverseinternal static void Reverse(char[] array, int...
by kribo
Ribbon (WPF) - ribbon:RibbonComboBox
by Member 3531622
Create a Rules Engine in less than 50 lines of code which is extremely powerful, extensible and adaptable
by PallavSingh
How to run a website on one PC to another PC through IIS 8.0
by prateek tiwari
Integration of SAP with .NET using SAPConnectionManager.
by Sonali Agarwal
Create an ASP.NET page where the user can edit/modify text for an image and then save that image with printed text on it.
by immortalus
This is an alternative for "Scroll Synchronization"
by Andrew Rissing
A function to generate an endless collection of scrolling text for your use/amusement.
by Mayur V Lohite
A basic guide for URL Rewriting
by yrimal
How to search XML content using LINQ in .NET.
by Shivarajbk
This article explains how to provide security to action in MVC applications
by Deenuji
Select multiple checkboxes in a GridView in an online shopping website.
by Muhammad Naveed
Programming models of ASP.NET
by AnobikDey
The article describes how to select all the contacts in Windows Phone 7 and 8
by Himanshu Thawait
WCF With No config file needed – all setting in code only, No IIS – Self hosted, consume by channel factory
by Jan_Zimmermann
A log4Net appender with a selfHosting SignalR server.
by Muhammad Kashif Saeed
this is the send mail or contact form in asp.net c#
by Peter Carrasco
A quick introduction to data annotations in C#
by Gautham Prabhu K
Creating and using Service Locator pattern
by Mohammad Dayyan, VahidJafari
A library for creating .Net Serializable Expressions to send via WCF services
by Kundan Singh Chouhan
Manage multiple sessions in a single property
by Ed Gadziemski
How to set a null binary value (zero-length binary value) in the registry from your C# program.
by Ahmad F Hassan
Step by step, creating LINQ to SharePoint Data Access Layer using SPMetal
by Adel Refaat
A SharePoint WebPart that hosts Razor files (.cshtml, .vbhtml)
by Hossein Shahpouri
Learn how to share ASP.NET sessions on different websites
by Prerak Patel
Here you'll fine many more..http://www.codinghorror.com/blog/files/Visual%20Studio%20.NET%202005%20Keyboard%20Shortcuts.htm[^]
by Behzad Talebpour
Alternatively, you can erase your closing bracket (}) and VS will format the whole block (between opening & closing bracket). This works only if there is no syntax error in that block.
by Mahdi Ataollahi
Implementing Microsoft.AspNet.SignalR 2 and Microsoft.AspNet.SignalR.Client 2 in Silverlight
by Yaseer Mumtaz
Using SignalR with AngularJS to develop real time communication application in ASP.NET MVC and C#.
by D Joubert
Silverlight 4 OOB download problem solved ! Now we can pause, resume, restart.
by User-Rock
Silverlight user control validation display techniques
by Viral Sarvaiya
This tip shows how to create a Hello World example using Angularjs in an ASP.NET application
by Daniel Lieberwirth (BrainInBlack)
This describes a simple way to create interactive, bitmap based, buttons for WinForm applications.
by metastruct
Easy to use class for downloading, uploading, and other FTP commands.
by Kamalakumar
This is a simple chat program using WCF with NetTcp binding.
by Chinh Vo Wili
Send HTTP GET requests, consume ASP.NET Web API server
by jay1_z
The easiest, most straight-forward delegate tutorial.
by Gaurav Aroraa, Mahsa Hassankashi
In this tip, we will create a small utility using C# which tells us whether our API server is up or down.
by Dean Feng
A simple method to display a waiting dialog in WinForm application, and not block the main form.
by Pasan Eeriyagama
Simple Application Error Logging
by Sergey Morenko
Simple password generator, based on alphabets
by N_tro_P
Simplify your MVVM Properties
by Evgeny Bestfator
How to use WPF Styles in other assemblies, or other project types, like WinForms
by Greg Dennis
How to implement a single selection set across as many ItemsControls as your app needs.
by Tomas Takac
How to run an action after a quiet period
by gnanamu
Snippet for IDisposable Implementation
by Bimaln
Describe about the SOAP message in WCF with example.
by Omer Aziz
Solid background of a transparent control on a form
by Atulkumar P Patel
Anti Patterns are wrong practice followed by Developers. They are opposite to Design Patterns.
by piyush_singh
Strings literals are sorted on the basis of the position of the first occurrence of a block letter inside it
by PIEBALDconsult
This is an alternative for "Sorting Strings based on the position of the block letter"
by Srinivas-Miriyala
Executes SQL scripts in multiple databases at once.
by AE~1
A quick and easy tool for handling SSAS Cube Roles from C# Application
by Mohammed Hameed
Check-in/Check-Out mechanism for TFS - To avoid Build errors and improve productivity.
by Dirk Bahle
A flexible framework to retrieve and store application settings upon start and shutdown.
by Maxim Fedotov
Presents StringFormat methods with string (not integer) keys in 'format' string.
by dibley1973
Call stored procedures in a type safe way using my StoredProcedureFramework for .NET
by Bryan Lyman
Generic list wrapper that returns a smaller strongly typed sub-list which modifies the parent-list when changed, without using events
by Maciej Wojton
Style a WPF TabControl border to be thicker and have rounded corners.
by puzsol
This outlines a method for being able to submit HMTL tags from a particular ASP.NET text box while still using the page validation for the rest of the page.
by Dennis Betten
How to implement Switch user functionality using MVC4 and Windows Authentication (a bit like SharePoint)
by Hrvoje Batrnek
Easy and seamless caching implementation of any virtual method in any class
by Ashwin. Shetty
Test Driven development using Mocking Framework
by Muhammad Kashif Saeed
Tell a friend form send mail to a friend from the website
by Raja.Krishnasamy
Attached the test data with method for regression testing by declaring ref type in attribute
by Shining Dragon
A TFS build template that cleans up after itself once the build is complete
by taha bahraminezhad Jooneghani
How to prevent one-click attacks.
by Cory Charlton
A thread-safe implementation of the ObservableCollection class
by Pranay Rana
Following is code by which you get time in (HH:SS:MM) formate by passing second as argument public string getFormattedTimeFromSecond(double second) { TimeSpan t = TimeSpan.FromSeconds(second); string formatedTime = string.Format("{0:D2}H:{1:D2}M:{2:D2}S", ...
by Lalit Sharma
Tips to save time in typing repetitive code in Visual Studio 2010 IDE
by puja11191
This tip shows how can we generate and save XML files
by Tauseef M
This tool is used for Encryption of Database in SQL Server 2008 Enterprise Edition
by JV9999
Not really, because what if your finally block would contain more lines of code than the single line you have in your example? That would make it already much harder to read.Secondly, you are misusing the Dispose method. You shouldn't invoke anything in it, especially not the Action, you...
by supercat9
There are times when "try"-related wrappers can be useful. For example, a Try() wrapper DLL written in a language other than C# could pass an Exception parameter to the Finally clause indicating whether the Try clause succeeded. For example:Try (() => {DoSomething();}, (Exception inner_ex)...
by LShep
Turn an Enum into a simple state machine via a generic wrapper and modular increment methods
by Tania Jindal
In this tip, we see how DELETE HTTP verb can be used to generate a DELETE request passing data both in request Body and Uri
by Anupam Singh_
This tip is all about understanding the controller factory and exploring it...
by Shashank Bisen
This article will help you in understanding Optional Parameters and Named Arguments introduced in C# 4.0
by programmerdon
Uninstall applications with WMI
by Praveen_Kumar Gupta
Manage Unique page id for sessions on each browser tab
by Andrew Rissing
A simple trick to remove the delay of Thread.Sleep for unit testing.
by Stephen Inglish
When working with the new URL routing portion of the ASP.NET 4.0, there is a gotcha that needs to be worked around.Assume a website with the following structure:~/Images/header.jpg~/Stylesheets/style.css~/Scripts/scripts.js~/Driver/Details.aspx~/Default.aspxAlso assume you...
by Sonali Agarwal
Creating a simple Text Editor web application using multiple web services.
by Oleksandr Kulchytskyi
More advanced singleton implementation.
by Ufulum
Sample of how to make a listview popup for editing a cell in a DataGridView.
by Michael B. Erickson
Control the changes to structured data exposes by your .NET objects
by Deepak Kr Choudhary
This article is about the session use in ASP.NET.
by Md Nazmoon Noor
Uses of Func in C#
by User 7427435
Synchronization
by Dieter Deysel
Combining custom attributes, reflection and generics to maximize the use of enum in a system.
by Tyronne Thomas
Using C# to monitor the bandwidth for wireless devices.
by Richard Deeming
This is an alternative for "Using Extension Methods To Avoid XML Problems"
by Redslide
HttpLib makes it easier to asynchronously consume data from web services in C#. The library contains methods to upload to and download from web services.
by RCoate
Using Extension Methods to validate string, integer, datetime, and bool values.
by ashish_5437
Implement validations in knockout js
by Jacky Yiu
Visual cryptography is a cryptographic technique which allows visual information (pictures, text, etc.) to be encrypted in such a way that the decryption can be performed by the human visual system, without the aid of computers.
by Marcello Cantelmo
Function Sqrt(ByVal value As BigInteger) As BigInteger Dim a As BigInteger = BigInteger.One Dim b As BigInteger = (value >> 5) + 8 While (b.CompareTo(a) >= 0) Dim m As BigInteger = BigInteger.Add(a, b) >> 1 If (BigInteger.Multiply(m,...
by NikStar
Using OutgoingMessageProperties and OperationContextScope to implement authorization by http header for WCF client that communicates with non WCF-based web services.
by sandeep12jain
WCF Restful Service Authentication without SSL Certificate
by xibao
Generate class definition for Web API Service Models.
by In the Face of God
Generalize to access data in a database via HTTP
by josh-jw
This tip will help you to develop a webgrid in ASP.NET MVC application.
by Mathi Mani
Color code cells of WebGrid based on values of the cell
by Tony Dubey
This code demonstrate pros and cons of PLINQ as compared to LINQ
by Avirup Das
This tip describes an application to control with Sony TVs connected to your Home Wi-Fi network from PC.
by Surender Singh (CodeToastDev)
Learn to store/read data from Windows 8 app and available file storage options for Win8 apps.
by Sibeesh KV
Working With JQX Grid With Filtering And Sorting
by jmix90
As you may actually know WPF introduced the routed events. These last are no more specific to a single control but they are routed inside the tree of your controls. If you want to stop an event, you can mark it as Handled. If so, the routing engine will stop to propage it. In fact this is...
by Rohit Dot net
Validation control with a single validation rule is easy, but what if we need to validate a control using different validation rules. This article tells how to achieve multiple validation on single control in an easy and systematic way.
by Amin Esmaeily
Creating a bar chart with most of needed features.
by Emiliarge
Using WindowChrome from Microsoft.Windows.Shell.dll
by Dirk Bahle
A message box service implementation that is based on WPF.
by #realJSOP
One way to get around the "invalid character" error
by Chinh Vo Wili
This tip describes how to use Selenium WebDriver extension for jQuery of RaYell and customize waiting element loading
by Mirza Ali Baig
Learn how you can create Windows Services to perform some useful long running operations in the background.
by Md. Rashim Uddin
XML Serialization and Deserialization in c#
by Praveen Kumar Chauhan (PRK)
Sending Data Through XML to web Services
by taha bahraminezhad Jooneghani
A custom validation control for FileUpload controls that validate like required validator, and have two more methods for extensions and file size!