Using StringBuilder for string concatenation

While researching up about general good C# development fundamentals, I found some information regarding string concatenation. Often my interaction with strings were mainly defining a message using String.Format(). e.g. But, there have been times where you might do a bit of string str += moreString…

A Description of a Delegate

Like a placeholder for a function that can be applied. Imagine a class saying “You can use me, and then give me a method to execute”. Below is a syntax example of this: // OUTPUT Hello

Diagnosing performance issues in the database

Often it’s the database that is suspected when performance is surprisingly slow. After dealing with the situation a few times and talking to a couple of DBAs, I’ve established a few approaches to diagnosing where performance issues may lie. Scenario Imagine that you’re working on…

Detecting current version and edition of SQL Server

Here’s a handy script to tell you exactly what edition and version of Microsoft SQL Server you’re looking at. My local installation of SQL Server gave me the following output —————————————————————- Microsoft SQL Server 2012 – 11.0.5058.0 (X64) May 14 2014 18:34:29 Copyright (c) Microsoft…

Matching an integer to an enum value

With an enum data type, you can specify just string values, or you can also specify an integer value along with the string. e.g. Enum with string values public enum Enum with string and integer values One great way to make use of this is…