Converting Numbers to Ordinal Strings
Here's a simple routine that converts a number (1, 2, 3, etc.) to an ordinal string (1st, 2nd, 3rd, etc.)
By Jonathan Wood •
Created on Saturday, February 26, 2011
|
Ensuring a Path Exists
Creating a single directory is easy: Just call CreateDirectory(). However, creating a multilevel directory when the parent directories may or may not exist requires a bit more work.
By Jonathan Wood •
Updated on Saturday, December 4, 2010
|
A Google DoubleClick Custom Web Control
Here's a custom web control that makes it very easy to display Google DoubleClick for Publisher (DFP) ads on an ASP.NET website.
By Jonathan Wood •
Created on Tuesday, April 19, 2011
|
Confirm Before Deleting GridView Item
Use this technique to efficiently confirm a delete operation with the user from controls such the GridView control.
By Jonathan Wood •
Updated on Tuesday, December 7, 2010
|
Displaying File Sizes
Here's the routine I use to display file sizes similar to the way Windows Explorer does.
By Jonathan Wood •
Created on Monday, January 17, 2011
|
Accessing the Windows Registry
Although the Windows registry is no longer the recommended place to store your application's settings, there are still a few advantages to doing so. Here's a discussion of how to access the Windows registry using C#, and source code for a sample program that makes it easy to store your application's settings.
By Jonathan Wood •
Created on Monday, April 21, 2014
|
Precisely Defining Kilobytes, Megabytes and Gigabytes
Developers are familiar with terms such as kilobytes, megabytes and gigabytes. Most of us know that a kilobyte is approximately a thousand bytes and a megabyte is approximately a million bytes. That knowledge is sufficient for most purposes. This short article provides the information you'll need to be more precise.
By Jonathan Wood •
Created on Wednesday, November 10, 2010
|
Extending System.String
Using extension methods, it is easy to extend an existing class. Here's some code to add a number of interesting extensions to System.String.
By Jonathan Wood •
Created on Friday, July 11, 2014
|
Parsing Text with Extension Methods
Extension methods are a cool new feature of C#. This article describes extension methods and presents code that adds a number of methods related to text parsing to the String class.
By Jonathan Wood •
Created on Monday, March 7, 2011
|
Resolving Partial URLs
This article presents code that resolves a partial URL by combining it with a base URL.
By Jonathan Wood •
Created on Thursday, December 16, 2010
|