Nov 162011

Given most programming problems there is an almost endless number of ways to implement a solution for even the most simple task. One of those tasks that many take for granted is string manipulation. When talking to a friend recently about this it brought up the question of which method is faster and better performing. So I decided I needed to look at execution speeds and memory usage of three of the main string manipulation implementations; String.Format, StringBuilder and String Concatenation. Continue reading »

Apr 152011
While writing a large series of in-line if / else statements I came across a very fundamental question.  Which one is faster, in-line if / else statements or your standard if / else statement block?  No matter who I asked no one seemed to have a good answer, so I took it upon myself to find one.We can all probably agree that in-line if statements certainly take up less space and some may argue that the are much cleaner code.  And to be fair the more I’ve used in-line statements the more I’ve come to like them.  But the question still remained, in the realm of performance which one was faster. Continue reading »
Dec 092009

I’ve finally gotten around to finishing this second post. The first part of the Post can be viewed here.

In my first fun with enumerations post I went over how to use an enumeration as a data source. That is all good and dandy when you are working with enumerations and want to put them into the data base. But what happens when you need to pull that value out of the database and convert it back into an enumeration. This is a problem that I have been faced with in the past. Continue reading »

Oct 292009

This is the beginning of a guide to enumerations that i’m working on for Code-Project.

When dealing with data driven application design look up tables are something that have been used heavily to help express a value for something that can be cross referenced.  For instance if you want to store the alignment of text that you are storing in a database you wouldn’t want to store the full string representation of the alignment.   You also wouldn’t want to create a look up table as your alignment options are unlikely to change and it would only cause to create an extra unneeded table in your database structure. This is where enumerations come in. Continue reading »

Oct 232009

There are times when having your own collection of objects can come in handy in an application. Say for instance you want to create an list object that you can add or remove items from and then do something with the collection as a whole. Sure you could pass around the Generic List object of your given object type and create a method that does what you want and accepts the generic list, but that seemed rather disconnected to me. Continue reading »