04/06/2015 by Nitesh

How To Sort A Dictionary Object by Values in C#

Friends, Microsoft .Net provides us with classes like SortedDictionary that allows the elements of a Dictionary class to be sorted by Keys. However, in some scenarios we want the Dictionary elements to be sorted by the values present in each element. Today, in this post we will see how can we sort a Dictionary Object…

Continue Reading »

03/06/2015 by Nitesh

How To Return Multiple Values From Function in C#

Friends, We all know Functions in C# has a function signature, function body and a return type. The signature comprises of the parameters sent to the function, Function body is the lines of code executed when the function is called and the Return Type is the type of value returned to the calling function. However,…

Continue Reading »

02/06/2015 by Nitesh

How To Create a TextBox Accepting Only Numbers in Windows Forms

Friends, Many times we need to have a textbox on our windows forms where we need to accept only numbers from the end users. .Net does provide us a NumericUpDown control but it is not always handy. In this post, we will see how we can create a TextBox accepting only numbers in Windows Forms…

Continue Reading »

01/06/2015 by Nitesh

How To Calculate Age in C#

Friends, Another post that is used in almost every application built where one need to calculate the age of a person using C# when his/her Date Of Birth is given. This post will explain how can we calculate age in C# when the user enters his/her Date Of Birth.      static void CalculateAndPrintAge(DateTime birthday)     …

Continue Reading »

04/05/2015 by Nitesh

How to Change Connection String of Query in Infragistics Report at Run Time

Friends, In a previous article, we saw how we can create a report using Infragistics Reporting. If you have not read it so far, you can read it here. In that post you might have noticed that we are using the in-built SQL Data Source from the “Report Data Explorer” window. Now, normally we develop…

Continue Reading »

1 5 6 7 8 9 38