Tip of the Day #4 (Connection Strings in Config files)

From .NET 2.0 onwards a new and improved configuration management system has been put in place. You can now add a <connectionString> element to the config file and use it to place the connection strings to the database and then retrieve then in a consistent way in your application. It supports multiple connection strings too […]

How to get a list of all subdirectories

This is an example of how to obtain a list of all subdirectories using a recursive method with the .NET Framework. public static List GetSubdirectories(DirectoryInfo directory) { // Set up the result of the method. List<DirectoryInfo> result = new List<DirectoryInfo>(); // Attempt to get a list of immediate child directories from the directory // that […]