Fun With Linq!

Posted by: Imar Spaanjaars at Friday, March 16, 2007 4:30:33 PM in: C#

Quite often I have discussed the impossibility of joining data from a database with that of the file system. I discussed it with my team members, mentioned it in trainings and wrote about it recently in this article.

Being able to join data from a database with other data from a file system could be very useful though.

Read on ...

How Do I Retrieve the Location of the Temp Folder for the Current User?

Posted by: Imar Spaanjaars at Sunday, April 11, 2004 1:21:19 PM in: C#
When you're working with files, it is sometimes necessary to write to temporary files. Of course you could drop those files in the application's folder, but it's good practice to save those files in the user's Temp folder instead. This snippet will return the full path to the user's temp folder, e.g. D:\Documents and Settings\Imar\Local Settings\Temp\, so you know where to save your temporary files.
For this code to work, you'll need to import the System.IO namespace.
Read on ...

Singleton Class

Posted by: Imar Spaanjaars at Friday, January 16, 2004 5:08:08 PM in: C#
This article is considered obsolete. Take a look here instead. This snippet shows you how to implement a Singleton class in C#.
Read on ...

Measuring the Size of an Image with C#

Posted by: Imar Spaanjaars at Tuesday, December 30, 2003 7:22:58 PM in: C#
It can be useful to be able to retrieve the Height and Width of an image file you have on disk. The following snippet shows you how to do that:
Read on ...

A Write-Only Property in C#

Posted by: Imar Spaanjaars at Thursday, September 25, 2003 7:39:08 PM in: C#
This sample code shows how to create a simple Write-Only string property in a C# class.
Read on ...

A Read-Only Property in C#

Posted by: Imar Spaanjaars at Thursday, September 25, 2003 7:38:28 PM in: C#
This sample code shows how to create a simple Read-Only string property in a C# class.
Read on ...

A Property in C#

Posted by: Imar Spaanjaars at Thursday, September 25, 2003 7:38:13 PM in: C#
This sample code shows how to create a simple string property in a C# class.
Read on ... 1