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

C#3.0

C#3.0

Great Reads

by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation
by Aydin Homay
In this article, I tried to show a real benchmark based on presser test method, for a Big Data collection deals on C++, C#, and VB.NET.
by Mike Corley
C# (.NET and Mono) library provider for RRDtool
by Oleg Shilo
The extremely simple implementation of generic "Extension Properties"

Latest Articles

by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation
by Aydin Homay
In this article, I tried to show a real benchmark based on presser test method, for a Big Data collection deals on C++, C#, and VB.NET.
by Mike Corley
C# (.NET and Mono) library provider for RRDtool
by Oleg Shilo
The extremely simple implementation of generic "Extension Properties"

All Articles

Sort by Score

C#3.0 

by yazanjaradat
Ant-Colony Based Routing Algorithm (ARA) C# Simulation
by Vinayaka Krishna Shenoy
.Net Performance tip - 2
by DaveAuld
Here is a better evaluation of performance in .Net of the If / Switch operations;http://www.blackwasp.co.uk/SpeedTestIfElseSwitch.aspx[^]
by Muthu Nadar
This article will explain about null coalescing operator along with its advantage and disadvantage.
by qlipoth
All too often, I have to match disparate objects 1 to 1
by JatinKhimani
Develop a web application in 3 layer architecture code style
by charles922
3D programming with OpenGl and C# to create an interactive puzzle
by Jeong, WonYoung(Brad)
Making BitField with C# alternative to BitField made with union and struct of C++
by cesar_boucas
A custom derivative of ServiceHostFactory to control how WCF service hosts are created.
by Niladri_Biswas
This short article will demonstrate an idea of making a custom switch case in C#
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 shijo joseph
A file backup manager with simple user interface and all the essential functionalities.
by Jarno Burger
A managed wrapper around FreeFrame, to give your video frames some cool effects
by shijo joseph
An easy to implement yet powerful logging library which requires absolute zero learning curve
by bluecurve01
How to parse robots.txt and robots meta tag
by LLLLGGGG
A really simple implementation of a C# menu for console applications
by Redslide
Modify MVC Routing to allow routes such as /Electronics/Software/Operating-Systems/PC/Windows-8-Installer
by Narsimlu Keshagouni
Adding fonts to Infragistics WebHtmlEditor
by Christopher John Paul
Ajax Asynchronous Postback Method
by Rudy du Plooy
This code creates a mutex before starting an application and releases the mutex when the application is closed. A user will only be able to start the application once. This can be used for services as well./// /// The main entry point for the application.///...
by DaveyM69
Now your application can update it's saved data regrdless of the account it is running under.
by Pavel Yermalovich
An example of Prototype pattern
by Yossi Yaari
A basic yet generic state machine implementation
by nasir_ml
ASP.NET textbox validation made easy.
by kadaoui el mehdi
In this trick I present how to prevent an attack by a hacker on Asp.net website.
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 ambatisreedhar
Export to Excel,default formatting of excel,excel number format,excel date format,excel currency format
by Igor Pashchuk, MBA
This is an alternative for "C# Pivot Table"
by Saddoud Anis
Allow your applications the ability to backup and restore your PostgreSQL databases.
by DaveyM69
A few quick examples of how to correctly create events.
by #realJSOP
Can't you just call Enum.GetNames(), and then bind to the collection returned by that method?
by Xmen Real
here is what I do to iterate through enumpublic static ABC(Type enumType){ foreach (Enum e in Enum.GetValues(enumType)) { int tvalue = Convert.ToInt32(e); string tname = e.ToString(); }}
by Amit_Mittal
An easy way to bind XAML with properties defined in code behind
by Emiliarge
Both MS Access formats (mdb and new - accdb), MSSQL 2008 R2, MSSQL CE, SQLite, MySQL
by Emiliarge
Read and write data to Access databases without limitations caused by the use of the SQL.
by blitzkrieged
An alternative ProgressBar for C# with extra functionality
by Sameera Millavithanachchi
This is a custom mapper which can be used to map two objects instead of automapper
by Darkencrow
A multi-drawer style collapsable UI container
by Sympletech
A simple utility to help convert strings into other types
by Emiliarge
2 ways to read and write data to *.xls and *.xls files and display it on DataGridView.
by Vishal_Kumar
Call server side code using ASP.NET AJAX and jQuery AJAX
by Kaveh Yazdi Nezhad
A simple solution to capture entire HTML code of a web page which is displaying on Internet Explorer
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 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 Gandhi Ashish
Checking Internet Is Connected Or Not From .NET
by J a a n s
For C# guys....using System ;using System.Runtime ;using System.Runtime.InteropServices ;public class Internet{ [DllImport("wininet.dll")] private extern static bool InternetGetConnectedState( out int Description, int ReservedValue ) ; public static bool...
by Anshul R
Dim value As Boolean = My.Computer.Network.IsAvailable can be used in a situation where the only network a system will be connected to is the Internet.Dim value As Boolean = My.Computer.Network.Ping(hostNameOrAddress ,timeout) hostNameOrAddress can be any valid website -...
by rodrigo diniz
A small class that transforms the contens of an OFX file into a DataSet.
by Mike_999
Download GridDetailsView.zip - 143.06 KBIntroductionThis is one of the frequently asked question among developer community.How to display a form which shows content of a DagaridView row while clicking on it. Here I am demonstrating DataGridViewLink column type usage for this...
by kabdolla
Create your own keyboards, keypads/ virtual buttons on top of other windows; filter unwanted input.
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 Suvabrata Roy
How compiler manage anonymous types
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 Pandey Vinay
This is a direction to use Google Maps API Rest Services instead of using it from JavaScript.
by Anshul R
The Perfect Translation/Conversion of Code
by Ram Balak Sharma
Useful when calling a C# method from JavaScript by using JSON which returns a DataTable.
by Mohammad A Rahman
Following might be another way to do the job:public static string ConvertDataTableToString(this DataTable dt){ StringBuilder stringBuilder = new StringBuilder(); dt.Rows.Cast().ToList().ForEach(dataRow => { ...
by OriginalGriff
I wrote this because I was interested in a Q&A question which asked for exactly that. Since I quite often use DataTables to transfer data, and to display it for debugging I knocked up an extension method to do it.
by cmschick
Thanks for sharing. I have a similar utility with additional capabilities that some of you might find useful.using Microsoft.VisualBasic;using System;using System.Collections;using System.Collections.Generic;using System.Data;using System.Diagnostics;using...
by Shru37
Modified code from another article to consider field repetitions while converting HL7 message to XML
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 Sandeep Singh Shekhawat
This tip introduces two extension methods of the HtmlHelper class, one that obtains the Id in a jQuery function and another obtains the Name in a jQuery function.
by SuhasHaridas
Create Linq to SQL connection with select, insert, delete, update
by Sujith Karivelil
Creating a link in the left pane of the file Explorer - like OneDrive or DropBox
by Rajkumar Reddy Mar31
Recently, one of my jobs demanded me to create a windows service for scheduling some tasks without human intervention, all we need to mention those services XML file.Configure the scheduled tasks in an XML file (Tasks.xml)On Service Start, load the tasks configuration from the Tasks.xml file...
by Mik Wadstrom
Simple way to use Crystal reports as embedded dynamic printable reports
by Aliaa Ezzat
Custom paging control for repeaters
by Daniel Lo Nigro
Custom strongly typed HtmlHelpers in ASP.NET MVC
by DaveyM69
Enables access to the original argument in all events
by Monotosh Roy Mon
XML Serialization & Deserialization for converting our object to XML and XML to Object
by Hassan Alrehamy
JSON Deserialization in depth concept and Dictionary mapping. Special Thanks to Dr. Coral Walker
by Pandey Vinay
This is how you can develop web application for mobile phones using .NET.
by bbirajdar
Difference between var and dynamic in C#
by Roberto Carlos Beyra
Disk Space Alert for Server Backup with email-notification
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 ss9o9o9o
Transferring backup files from a remote SQL Server and Dynamic SQL Connection with Restore utility.
by Sujeet Bhujbal
Article on dynamically generating Forms in WPF and Silverlight.
by kennysun
encrypt all stored procedures in SQL server with powershell
by Jana Sattainathan
There is an easier way to get the Oracle data source than custom-code a TNSNames.ora parser.
by Nandakishore G N
Example For Gridview RowCommand Event
by JRINC
Connect to remote socket via System.Net.Sockets.Socket.Connect method with timeout controlled by System.Threading.Timer
by Bhasker Kandpal
Exploring the behaviour and capabilities of a property grid control.
by lperumb
How to export to Excel from DataGrid using an Microsoft Access database.
by JatinKhimani
Export Gridview data in Excel formate with gridview design.
by Sandeep Singh Shekhawat
A brief discussion about extension methods in C#
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 Mohammad A Rahman
Few extension methods of String concatenation in C#
by Rishikesh_Singh
Filtering records from List similar to Sql IN Operator using LINQ
by munagalasantosh
Access Multiple Resource file and find and replace the textual content in resource file
by Morten Skaarup
Using recursive programming to solve the puzzle
by Yuri Heymann
Source code for the article titled "A Finite-Difference Model for the Thermal History of the Earth
by dgDavidGreene
How to find and link config and other files from other projects within your solution.
by dotted_decimal
Extension method that defines a format specifier q or Q and finds the Quarter for a DateTime value
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 DaveyM69
How to convert a generic List of derived types to a generic list of base types.
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 cs981khx
Code snippet that gets you the latest version of .NET and also checks if a specific version exists
by SoumenBanerjee
Get page HTML using System.Net.WebClient class of .NET as well as striping HTML using Regex and export a list into Excel or XML.
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 Mithun Achar
GridView with DataPager in ASP.NET 4.0
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 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 fjparisIII
Cannot use Storyboard because ScrollView.VerticalOffset property is read-only. Must use old fashioned DispatchTimer.
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 Nandakishore G N
I'll Try To Explain Some Methods of Datatables.
by Péter V
How to detect 64 bit/process on .NET 2.0 to 3.5
by M.Farrukh Abbas
There is no fool-proof technique to catch the browser close event for 100% of time. The trouble lies in the stateless nature of HTTP. I will explain one of them which is very effective and tested
by jfriedman
//Using MooToolswindow.addEvent('unload', Cookie.delete.pass('applicationCookie'));//using JavaScript by itself...//http://www.quirksmode.org/js/cookies.htmlvar eraser = function () { eraseCookie('applicationCookie'); };if(window.addEventListener) window.addEventListener('unload',...
by SwarnenduDas
How to fetch an image document from FileNet for a known Document ID
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 Azure Developer
Authentication ASP application using Office 365 User
by yosonwan
Sometimes we need to kill a process programly. This article talk about how to get process array to process name and filter it.
by Dinesh Kr. Choudhary
Code that measures a time interval as you would measure the execution time of a task
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 tanmoysarkar
How to use LongTerm facts in BizTalk and improve performance
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 anshudutta
by Arno1973
A fix for ImageButtons problem in IE10 when project is not 4.5
by VaibhavTiparadi
Re-sizing images to equalize the width & height
by Shine K Velayudhan
Why and How to implement KnownType Attribute in WCF Service
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 Evgeny Pereguda
This is simple implementation of fast forward 1D DCT-II on MSIL which is generated at runtime.
by Ashwin. Shetty
Lazy loading object in DI using Castle Windsor & System.Lazy
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 Pranay Rana
Linq Joins with SelectMany
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 Mohsen Heydari
Intercepting WCF and SOAP services for logging SOAP envelope
by harbor
Manual Scroll Panel in a Panel or UserControl with AutoScroll=false
by lampiclobe
An infinite number implementation with advanced division and modulus operators.
by Yossi Yaari
A solution for monitoring Events called during test.
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 Yuri Heymann
Source code for the paper titled "A Monte Carlo simulation framework for testing cosmological models"
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 Nicolas Dorier
Want to use multi selection in WPF TreeView ? <Setter Property="BorderBrush"...
by Nitin Singh India
People wonder how do delegates work and the threading issues associated with multicast ones.
by InbarBarkai
Create and use a multiple value slider
by JatinKhimani
Nested GridView With Editing Facility of both gridview.
by azweepay
Create a GridViewColumnCollection with resizable and non-resizable columns
by Sanjay4India
Append New line in multiline TextBox
by Sanjay4India
I would like to share a brilliant piece of code as a continuation to my Nuts N Bolts which I encounter on my day to day developments and maintenance here and there:This is for removing repeated data from DataTale: public DataTable FilterDuplicateRows(DataTable dTable, string colName) ...
by shahed.sohail
Passing Parameters to Success method in executeQueryAsync.
by Mr. Tapan Kumar
In this article I will describe how to integrate paypal in your asp.net web application
by Handy Torres
POCO to CAML simplifies creating of CAML queries by using expression trees.
by textorijum
How to SIMPLY populate TreeView from some sort of "list" variable / object / structure
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 AndrewSmith
Creating a custom base job class for quartz scheduler development
by yousafzai amazai
ref and out parameters in C#
by Ashwani Hundwani
by Member 3128846
Example to implement remoting concept using SQL Server database
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 Demid Korneev
Example of AltNETType use in OpenGL
by JatinKhimani
This tip provides the repeter paging with First and Last Page button
by Rajdeep Debnath
Replace all HTML tags from text/string
by Tyronne Thomas
Resolving a hostname in C#
by Yogesh Gulve
Return Comma Separated String using SQL
by PallavSingh
How to run a website on one PC to another PC through IIS 8.0
by Nelson Kosta Souto
Running the same compiled assembly on Windows and Linux.
by youngseagul
How to run Crystal reports in MVC 4 using PDF.js and PDF viewer
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 yrimal
How to search XML content using LINQ in .NET.
by Deenuji
Select multiple checkboxes in a GridView in an online shopping website.
by Himanshu Thawait
WCF With No config file needed – all setting in code only, No IIS – Self hosted, consume by channel factory
by Muhammad Kashif Saeed
this is the send mail or contact form in asp.net c#
by Gautham Prabhu K
Creating and using Service Locator pattern
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 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 venkynataraj
MyComputer, ControlPanel, RecycleBin, NetworkPlaces on Button Click
by charles henington
public enum ProcessType { ControlPanel, MyComputer, NetworkPlaces, RecycleBin } private static string MyComputer = "::{20d04fe0-3aea-1069-a2d8-08002b30309d}"; private static string RecycleBin =...
by Anshul R
For Control Panel:Process.Start("control.exe");For My Computer:Process.Start("explorer.exe", Environment.GetFolderPath(Environment.SpecialFolder.MyComputer));For the rest, we can use GUID just like the original.For Recycle...
by Uday Kumar B R
In this article you will learn How to develop Silverlight Application
by User-Rock
Silverlight user control validation display techniques
by Bhavanarayana.Vempati
Simple and best example of how to work with Event Handlers.
by metastruct
Easy to use class for downloading, uploading, and other FTP commands.
by AdrianJ2K
An implementation of a Simple Cache using PostSharp, ConcurrentDictionary with a Lazy value and dynamics
by jay1_z
The easiest, most straight-forward delegate tutorial.
by Pasan Eeriyagama
Simple Application Error Logging
by Sergey Morenko
Simple password generator, based on alphabets
by charles922
Simple Polynomial Addition and Subtraction using Lambda Expressions for sorting Lists
by Tushar K. Skype(tushar.kshirsagar24)
This is a simple ticket printing system that I have prepared for programmers who want to learn how to do receipt like printing.
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 Pankaj Nikam
This tip demonstrates the way we can use WPF Textbox to check for spelling errors and using it via web service.
by Maxim Fedotov
Presents StringFormat methods with string (not integer) keys in 'format' string.
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 wmjordan
Generic Lists or Generic Types contravariance without casting.
by Muhammad Kashif Saeed
Tell a friend form send mail to a friend from the website
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 Jaime Olivares
How to initialize auto-implemented properties in structure constructors
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 Member 10872251
Two way binding using JavaScript
by Christopher John Paul
UDP based chat application.
by Anupam Singh_
This tip is all about understanding the controller factory and exploring it...
by AnuragTripathi
Convertor for Unicode to Krutidev and vice-versa.
by Tsuda Kageyu
An application of lambda expressions to simplify your code.
by codefabricator
// Even more simplifiedclass Program{ [DllImport("user32", ExactSpelling = true)] static extern bool EnumWindows(WNDENUMPROC lpEnumFunc, IntPtr lParam); [UnmanagedFunctionPointer(CallingConvention.Winapi)] delegate bool WNDENUMPROC(IntPtr hwnd, IntPtr lParam); ...
by neham_2000
This tip demonstrates user permissions in SharePoint-hosted apps in SharePoint 2013 with attention to a multiple user scenario.
by Deepak Kr Choudhary
This article is about the session use in ASP.NET.
by Tyronne Thomas
Using C# to monitor the bandwidth for wireless devices.
by #realJSOP
Extension methods can help you avoid sticky situations.
by Rama Krishna Vavilala
I will just make it a little more compact by omitting the Contains method:public static string GetValue(this XElement root, string name, string defaultValue) { return (string)root.Elements(name).FirstOrDefault() ?? defaultValue; }The explicit operators for XElement...
by Richard Deeming
You can avoid all of this by using the explicit cast operators:public XElement Element{ set { this.MyVar1 = (string)value.Element("MyVar1") ?? "NO VALUE"; this.MyVar2 = (string)value.Element("MyVar2") ?? "NOVAL"; }}Both XElement and XAttribute define...
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 Nandakishore G N
Windows Phone 8 chat application using Openfire server
by Jigar Bagadai
Vaildate image content using System.Drawing.Image class rather than the image file extension in ASP.NET.
by RCoate
Using Extension Methods to validate string, integer, datetime, and bool values.
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 Sujeet Bhujbal
A practical example of a WCF service for inserting , Deleting and Displaying Data using a WCF Service in ASP.NET
by Đinh Công Thắng
You can fill any form, click any button, and extract any data from web by using Web Automation.
by In the Face of God
Generalize to access data in a database via HTTP
by ColinBashBash
Script to reconnect Windows mapped drives (Win7).
by Nandakishore G N
Send and receive XMPP messages in Windows phone 8
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 Emiliarge
Using WindowChrome from Microsoft.Windows.Shell.dll
by Balachandar Jeganathan
Custom attached property in WPF
by Diwakar M A
WPF based preloader animation sample. Let's make WPF applications more interactive during long process.
by fadi_sayyed
WPF Compare two brushes IsEquals
by Md. Rashim Uddin
XML Serialization and Deserialization in c#
by Praveen Kumar Chauhan (PRK)
Sending Data Through XML to web Services