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 => […]
No VB 6 Upgrade Feature in VS 2010
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 […]
XML Literals: Handling Empty Elements
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
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 […]
Get up out of that Chair!
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! […]
Rules to Better .NET Code
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!
Lambda Expressions: Join
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 […]