Deborah's Developer MindScape

         Tips and Techniques for Web and .NET developers.

Archive for March, 2010

March 30, 2010

Generating Random Letters

Filed under: C#,Lambda Expressions,VB.NET @ 9:46 pm

Someone recently posted in the forums the need to build a "Word Search" puzzle and wanted to generate a list of random letters. .NET has all of the features you need to do this in just two lines of code. In C#: Random rand  = new Random(); var letter = Enumerable.Range(0, 100).Select(         i => […]

March 28, 2010

No VB 6 Upgrade Feature in VS 2010

Filed under: VB.NET @ 8:22 pm

If you are still doing Visual Basic 6.0 and are still thinking about moving to .NET, be sure to keep your copy of Visual Studio (VS) 2008. VS 20010 will NOT have features to upgrade your VB 6.0 projects. Rather, you will need to use VS 2008 to upgrade from VB 6.0 and then upgrade […]

March 25, 2010

XML Literals: Handling Empty Elements

Filed under: VB.NET,XML @ 12:31 pm

In this prior post, I covered how to create an XML file using XML literals, a feature new in VB 9 (Visual Studio 2008). In this post, I’ll look at handling empty elements. If an element value is empty, you can create an empty element in the XML file using the techniques in the prior […]

Finding a set of Nodes in an XML String

Filed under: C#,LINQ,VB.NET,XML @ 11:48 am

In this prior post, I demonstrated how to find a node in an XML string. In this post, I expand on that topic to find a set of nodes. You can then process those nodes as needed in your application. In this example, the set of nodes are displayed in a ComboBox. If you are […]

March 22, 2010

Get up out of that Chair!

Filed under: General @ 5:26 pm

If you are a designer, architect, or developer, you may spend many, many hours in your chair writing design documents, modeling systems, developing code, building unit tests, and so on. It is easy to sit down at 8 AM and realize at 1 PM that you have not yet left your chair. GET UP, NOW! […]

March 4, 2010

Rules to Better .NET Code

Filed under: C#,VB.NET @ 3:50 pm

A friend of mine had sent me this link a few years ago regarding rules to better .NET code. I stumbled upon it again today and reminded myself how useful it was. So I thought I would pass along the link: Rules to Better Code. Enjoy!

March 3, 2010

Lambda Expressions: Join

Filed under: C#,Lambda Expressions,VB.NET @ 12:24 am

If you have a set of business objects that are related to another set of business objects by a foreign key, you can use the Join method in a Lambda expression to join the two sets of business objects into one. You can then use the resulting set as a single list. This is useful […]

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