Sample Code 
-
A simple code snippet that deep-copies an object by serializing and de-serializing using the BinaryFormatter. 
-
If you're targeting Windows Vista and your application requires administrator priviledges (such as accessing the program files directory), then it will fail unless you include a manifest so Windows knows. Here's how.. 
-
Learn how to use the free iTextSharp library to load a PDF form, populate some dynamic fields, and then save out a flat PDF file.. 
-
The following tutorial will demonstrate how to interact with http://tinypic.com, an image mirroring service, directly from a C# application using the WebRobot component.. 
-
This sample code shows how to use the iText library to generate PDF files on the fly. The iText classes are very useful for people who need to generate read-only, platform independent documents containing text, lists, tables and images.. 
-
An introduction to Visual WebGui through a sample application.
. 
-
Visual WebGui is not just another AJAX framework but rather a different approach to web application development, specially designed to simplify building highly complex applications like Outlook Web Access (OWA). Visual WebGui makes it possible for developers to create applications that were previously developed only by the "big guys". . 
-
The support for lists in C# 2.0 makes sorting and searching very easy. This code snippet demonstrates how to create a list of Person objects (with name and age attributes), sort by name, sort by age and search based on age.. 
-
The using statement in the c# language allows us to define an scope for an object lifetime. This statement obtains the resource specified, executes the statements and finally calls the Dispose() method of the object to clean it up.. 
-
Learn what's changed with .NET 2.0 and how to send out emails using an SMTP server that requires authentication.. 
-
Microsoft Agent is a new technology, which allows Programmer to create and use animated characters that can interact with end users. It also supports the Microsoft Speech API, which allows the character to speak with the user.. 
-
While developing Internet applications, this is important to check whether the internet connection is available or not. This snippet will be useful to achieve the above mentioned task.. 
-
One of the more significant improvement in .NET 2.0 is the transactions area. Now with a single line it becomes extremely easy to support transactional code blocks using the concept of “ambient” transaction thanks to TransactionScope in the System.Transactions namespace.. 
-
A simple demonstration of how to apply an XSL transformation to an XML file and save the output using .NET. 
-
IP2Location .NET component that translates IP address to country, city, region, latitude, longitude, ZIP code, ISP and domain name. Developers use this component for projects related to:
1. Display native language and currency;
2. Redirect based on country;
3. Digital rights management;
4. Prevent password sharing and abuse of service;
5. Reduce credit card fraud;
6. Web log stats and analysis;. 
-
How to read binary data from a file in C# - the right way!. 
-
Following secure development best practice, an application should obtain and store user credentials securely. Microsoft has provided a means to accomplish this on the desktop: the unmanaged Credential Management API, which exposes the capability to provide a standard login experience for the user which is also secure. This code demonstrates how to create a generic dialog implementation using this API.. 
-
Ever wondered why DateTime.Parse doesn't recognise non-US date format? Here's how to get it to!. 
-
A simple demonstration of how to use multithreading and delegates in .NET to execute a method that will take a long time, without locking up our main thread.. 
-
This sample source code demonstrates how to read IP3v1 and IP3v2 tag information from MP3's, along with MPEG headers too.. 
-
I've seen many, many requests on the Microsoft newsgroups asking how you can insert a picture into a Word document without saving it to the file system first. This example application described in this blog illustrates both methods for inserting a picture firstly using the Word object model (InlineShapes.AddPicture) and secondly using Word's XML support (InsertXML).. 
-
When you're writing Windows Forms applications it's always nice to be able to keep the UI responsive in order to avoid frustrating the user. Here's a method of completing your asynchronous work on the Application Idle loop rather than allowing another thread to wander into your Windows Forms code and then trying to deal with it by Control.Invoke.. 
-
How to calculate someone's age from their birth date.. 
-
Demonstrates how to write a stream to a file.. 
-
This is some code I wrote a little while back as an example O/R mapper.. 
-
How to add an additional menu item to a windows system menu.. 
-
Demonstrates how to build a much more responsive and user-friendly application by using asynchronous HttpWebRequests.. 
-
How to validate an Integer the fast/efficient way in C# using Double.TryParse(). 
-
A nice little class that takes some text, and will automatically wrap it according to a specified width.. 
-
A demonstration of how to implement an IE Browser Helper Object in C#. 
-
In PHP its a simple task to generate hashes, but in C# it takes a little more work. We'll create a Hash class to simplify the process.. 
-
A simple helper class to make generating an RSS feed a piece of cake - its the one we use on Developer Fusion too!. 
-
One of the most cumbersome things you will ever have to do with Winforms is updating your User interface while receiving events from another thread. These helper classes make it a breeze.. 
-
Demonstrates how to write a C# program that can "launch" a .cs file and execute it.. 
-
Learn how to add a program to the shell right click menu for every file.. 
-
How to merge an .exe and a .dll into one .exe using ilmerge in VS.NET. 
-
I need a time-out! Or more specifically, my methods need a time-out mechanism. And because I spent seven projects and quite some time on the web trying to find out how to do it correctly, I am writing this small article about the works. . 
-
Complex Data Binding a collection implementing IBindingList and ITypedList. 
-
Two classes that provide system menu functionality similar to the regular Menu and MenuItem classes so that you can use regular Click events instead of overriding WndProc.. 
-
To teach how to write XML and Schemas (or DTD's). Some of the schemas language can be difficult to understand. I needed an easy (and free) way to know if my work was correct, if not then exactly what was wrong with it. As implied above, this example will also show you how to use schemas in your own programs. . 
-
Data entry is a very important part of a lot of applications. It is important to validate data as it is entered without disturbing the user. Enter the ErrorProvider component.. 
-
Demonstrates how Databind the SqlTypes using the PropertyDescriptor class and the ITypedList Interface.. 
-
This short article describes how to use the NotifyIcon in your applications and how to add menus to the icon.. 
-
The code provided shows how to trim, find, search, replace and split strings. 
-
Shows how to create controls at runtime and set their properties. 
-
This example code uses the errorProvider control which ships with c# to validate data entry and shows the error icon if validation is not correct. 
-
Retrieves all files and folders within a specified folder location, along with the file size and extension.. 
-
This code shows you how to delete records with an SQL statement and get the number of records deleted returned back as an integer.. 
-
Since a connection cannot be used until a DataReader has been closed, it is quite often necessary to read the results of a DataReader into an array, then close the DataReader, then you can process the data in the array while you use the connection for something else. This shows you how.. 
-
Source code for a chat server, and the accompanying client program.. 
-
An FTP client library for C#, including asynchronous operation. 
-
A C# WebCam Windows Service demonstrating FTP upload, Windows Service Installer, and file rotation. . 
-
A program that searches on Google's Image Search.. 
-
A neat bit of code that checks if a domain is valid and actually exists.. 
-
A simple program that converts images into blocks of font tag colored 1s and 0s.. 
-
A simple AutoRedraw property to fool around with.. 
-
If you want to compare the performance of two processes, you can use this code to measure and print out the time takes by each process. 
-
How to convert a date and display it in the correct format for a given language.. 
-
How to convert an array into a comma-delimited string with String.Join. 
-
A simple wrapper class to combine the information contained in the .NET File and FileInfo classes.. 
-
How to add menu's to the system menu and respond to clicks.. 
-
Finding out how to convert one type to another in .NET is tricky. Here is the answer to converting a string to a DateTime type.. 
-
Someone recently asked on the Undernet #C# channel for help with inserting a block of XML into an existing XML document. After perusing a couple of MSDN articles here's what I came up with.. 
-
This example is to get you started using C# in Visual Studio.NET. It is intended to be used as your first program to test your Visual Studio .NET installation, and to start finding your way around in VS. 
-
Protect both your server-side and client-side scripting by using the MS encoding utility. 