Performance Tip: for vs. foreach in Microsoft .NET

Collections are one of the most commonly used types in programming. For any program that uses data, you will be dealing with collections. One of the most common things we do is to iterate over the collection to process the data. There are three main ways to iterate over a collection in .NET. for For … Continue reading Performance Tip: for vs. foreach in Microsoft .NET

Converting Value Types

Converting a type like a string to an value type like integer, can easily cause an exception, which is a huge performance killer.  Hopefully you have wrapped the conversion in a Try Catch block, if not your program could take a nose dive and your users will be upset. Consider the code below that converts … Continue reading Converting Value Types