The Solution Explorer in Visual Studio 2010 still has no search feature (at least not without a Visual Studio Extension). But it does support a type-ahead feature. Though not new, it is a little known feature. So here are the details. 1) Ensure the Solution Explorer has focus. 2) Start typing. In the screen shot […]
Solution Files: Change Project Directory Location
Renaming or moving files in Visual Studio is never an easy task. But one of the lesser known enhancements in Visual Studio 2010 is the ability to change the directory location of a project. Here is the scenario. The team decides that the projects need to be renamed. To keep things consistent, the directory file […]
Visual Studio: Pinning Projects on Start Page
Visual Studio 2010 opens with a new start page: One of the nice new features on the start page is the ability to pin projects so they will always appear in the Recent Projects list. If I want to try out some code, I sometimes start up a new "test" project. If I do that […]
VSLive! Conference in Redmond, Washington
There is so much to know these days with all of the new technologies, techniques, and tools in Visual Studio and the .NET framework. How do you even decide which technologies deserve your attention and which you can "give a miss"? One of the benefits of a technical conference like VSLive! is to figure out […]
Writing to an XML File With Attributes
This prior post demonstrated a very simple technique for writing to an XML file that has a set of elements. This post extends that example showing how to write an XML file that has both elements and attributes. Here is the XML file created by this example: <?xml version="1.0" encoding="utf-8"?> <Employee> <LastName>Baggins</LastName> <FirstName>Bilbo</FirstName> […]
Reading an XML File
This prior post detailed how to write to an XML file. This post details how to read that XML file. The example reads the values and populates three TextBoxes, but you can use this technique to read any information from an XML file. XML File: <?xml version="1.0" encoding="utf-8"?> <Employee> <LastName>Baggins</LastName> <FirstName>Bilbo</FirstName> <PhoneNumber>(925)555-1234</PhoneNumber> […]
Writing to an XML File
Sometimes, you just need to write some values to an XML file. If you are targeting the .NET Framework 3.5 or higher, you can use XDocument and XElement to do this easily. This post demonstrates how to write values to an XML string. The example writes the values from three TextBoxes, but you can use […]
Build a List of SQL Server Database Names
The trick to obtaining the list of database names from SQL Server is to know the name of the system stored procedure that you need to call. This post presents a static/shared method for obtaining the names of the databases in a particular SQL Server instance. In C#: public static List<string> GetDatabaseNames() { string […]