Monthly Archives: May 2012

File Reference vs. Project Reference in .NET

31-05-2012 File reference is when you add reference to a dll file. This is what you do when you have to use a 3rd party dll. The project reference is when you load a project into your solution and then … Continue reading

Posted in Microsoft .Net Framework | Tagged , | Leave a comment

List.Find Method in C#.NET

30-05-2012 The List.Find method requires a delegate function which can compare an object of the same type of the list and return if the object matches the target object. You can either declare a delegate separately or use following easy … Continue reading

Posted in C#.Net | Tagged , | Leave a comment

Comparing Objects in .Net – Reference Equality

30-05-2012 Comparing two objects returns true if they point to the same entry of the heap. Menol ILT

Posted in C#.Net, Microsoft .Net Framework | Tagged , | Leave a comment

How to Implement a Background Worker Thread that Supports Cancellation (How to Stop A Background Thread)

30-05-2012 The background worker in .net provides a method CancelAsync() to cancel a background worker. However, calling this method will not stop a worker thread there has to be several things you have to implement before. 1. First of all, … Continue reading

Posted in C#.Net | Tagged , , , , | Leave a comment

Cannot Find Contents Of System.Configurations?

29-05-2012 The visual studio shows the System.Configurations namespace by default. But it doesn’t show that namespace content (such as System.Configuration.Configuration class) by default. You have to add a new reference to System.Configurations namespace explicitly. This is more confusing as it … Continue reading

Posted in C#.Net, Microsoft .Net Framework | Tagged , , , | Leave a comment

How to Convert a Stack to an Array Without Losing The LIFO Order

29-05-2012 The index of elements in a stack increments. i.e. the latest item would have the largest index (which is equal to Stack.Length – 1). But when you use Stack.ToArray() method it returns items in the other way. So the … Continue reading

Posted in C#.Net, Software Engineering Concepts | Tagged , , | Leave a comment

Adding or Subtracting a Date Time Variable in SQL Server Using DateAdd Function

28-05-2012 You can use dateadd function to add or subtract a number of units from any part (year, month, day, hour, minute, second, millisecond, etc…) of a datetime variable. Syntax: – DateAdd(Date Part, Number Of Units To Add, Source Date) … Continue reading

Posted in SQL Server | Tagged , | Leave a comment

What is Go in SQL Server and the Importance of Using Go

25-05-2012 Go is not a SQL or Transact SQL command. Go is a command recognized by sqlcmd and osql facilities provided by SQL server studio. Go specifies an end to a particular SQL batch. Once the parser interprets a Go, … Continue reading

Posted in SQL Server | Tagged , , | Leave a comment

Importance Of Specifying Variable Length For Varchar in SQL Stored Procedures

23-05-2012 If you don’t specify a variable length for NVarchar, Varchar variables, the parser will assume the length of 1. It will not complain. Instead it will just truncate whatever you pass to the variable and use the first character. … Continue reading

Posted in SQL Server | Tagged , , , , | Leave a comment

How To Temporarily Undo Or Turn Off Auto-Correct In Excel

22-05-2012 The auto correct feature can run you mad sometimes. For example, today I had to type EHR in Excel and it kept auto correcting it to HER 🙁 I did a quick search and following are our options around … Continue reading

Posted in Microsoft Excel | Tagged , , , , , | Leave a comment