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 »
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 »
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 »
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 »