Sample Code
-
Calculate Age
by James Crowley
How to calculate someone's age from their birth date.
-
Large Number Operations
by Eric
What do you do when you want to work with numbers that have a total length of digits that reach into the billions? You sure can't store those in a conventional variable, or perform normal operations on them. This module demonstrates how to perform these.
-
Save a Stream to a File
by James Crowley
Demonstrates how to write a stream to a file.
-
Double buffering in .NET
by Simon Soanes
Ever wondered how to double buffer with a Graphics object so your GDI+ based game/control doesn't flicker annoyingly? Here's how!
-
Simple Object Relation Mapping with Reflection
by Simon Soanes
This is some code I wrote a little while back as an example O/R mapper.
-
Execute a Process and Fetch its Output
by James Crowley
Demonstrates how to redirect the output of a shell program (such as a batch file) so you can fetch the text it returns.
-
Calculate Diskspace Used by a Table or Database
by James Crowley
This short snippet shows how to discover how large a particular table or an entire database is in SQL Server.
-
Sending email from ASP.NET
by Orcs Web
One of the most commonly performed operations that I see in web applications - aside from database actions - is sending email from code. This demonstrates how in ASP.NET.
-
Forms Authentication Against An XML File
by Orcs Web
The code demonstrates how to validate a username and password against an XML file.
-
Modify a Window's System Menu
by Steven Cohn
How to add an additional menu item to a windows system menu.
-
Asynchronous HttpWebRequest
by Steven Cohn
Demonstrates how to build a much more responsive and user-friendly application by using asynchronous HttpWebRequests.
-
Update Recordset using a MultiSelect Listbox
by Julian Roberts
Demonstrates how to select the appropriate items in a multi-select listbox, and then return the new selected values to the database.
-
Resizing images retrieved from SQL server
by Simon Soanes
A neat way of fetching an image stored in SQL Server and resizing it before save/sending it anywhere.
-
Validating an Integer
by Simon Soanes
How to validate an Integer the fast/efficient way in C# using Double.TryParse()
-
Debug ASP.NET pages using Tracing
by Julian Roberts
Demonstrates a useful debugging technique taking advantage of traces in ASP.NET.
-
Embed text in Image using ASP.NET
by Julian Roberts
Demonstrates how to dynamically embed a text caption embedded into an image.
-
Custom Word Wrapper
by David Cumps
A nice little class that takes some text, and will automatically wrap it according to a specified width.
-
Multiple IIS Virtual Servers on XP Pro
by Steven Cohn
A work around that allows you to have multiple virtual servers on an XP Pro machine.
-
IE Browser Helper Objects
by Steven Cohn
A demonstration of how to implement an IE Browser Helper Object in C#
-
Customize XML Serialization using IXmlSerializable
by James Crowley
Learn how to implement the IXmlSerializable in order to customize serialization of your objects - for instance, serializing a NameValueCollection.