Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

Archive for June, 2010

June 30, 2010

Type-Ahead in Solution Explorer

Filed under: C#,VB.NET,Visual Studio @ 11:54 pm

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

Filed under: C#,VB.NET,Visual Studio @ 6:21 pm

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

Filed under: C#,VB.NET,Visual Studio @ 5:48 pm

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 […]

June 14, 2010

VSLive! Conference in Redmond, Washington

Filed under: C#,VB.NET @ 7:31 pm

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 […]

June 7, 2010

Writing to an XML File With Attributes

Filed under: C#,VB.NET,XML @ 10:57 pm

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> […]

June 6, 2010

Reading an XML File

Filed under: C#,VB.NET,XML @ 11:23 pm

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

Filed under: C#,VB.NET,XML @ 10:57 pm

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 […]

June 3, 2010

Build a List of SQL Server Database Names

Filed under: C#,VB.NET @ 4:17 pm

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 […]

© 2023 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs