Posts

Showing posts from June, 2014

Unveiled the features of C#

Hello Fellow developers! This article describes some tricks about popular contest questions. 1. Write a program to print current Source code line number in c#:  public static void Main(string[] args)  {      Console.WriteLine("Hello World, from line {0}!", GetLineNumber());      Console.ReadLine();  } private static int GetLineNumber([CallerLineNumber] int sourceLineNumber = 0) {     return sourceLineNumber; } You need to use System.Runtime.CompilerServices for "CallerLineNumber" attributes which Allows you to obtain the line number in the source file at which the method is called. Simply easy. isn't it? There are other attributes like [CallerMemberName] - which obtains the method name from which it was called, [CallerFilePath]- returns the source file path.  2. Now next puzzle, is a popular equation "2+2 = 5". so how to do it in C#?. It also pretty simple. believe me! public static void Main(string[] args) {         var resul

Snow Garba in Netherlands

Image
Hello Folks, This time I came with some non-technical, funny things to share with you. Garba is a traditional dance of Gujarat - India. People play it on someone's marriage ceremony. It also played on a festival called "Navratri" (nine nights). Navratri is a longest dance festival in the world. It is celebrated nine nights by playing Garba (whole night) . You can find more information on Navratri here . The above video will show you how to play Garba in traditional style. So Enjoy the Garba... Have a nice playing :)