Vista - Her name in school register

She is waiting for August 3rd 2005. Till yesterday she didnt have an official name. Parents and her relatives started calling her “longhorn”, some time back (before her birth). She is cute, beautiful.. Much better than her elder sisters and brothers. We didnt care her sibling’s petname. But now itself her petname spread across all over the world. Jealous neigbhour already started spreading rumors, hence parents have ensured she is mature enough for school admission. Here is her web site windows vista . Lets wish her a great success in her career :)



There are many online colleges available nowadays on the Internet, with an online school available for almost any subject, so consider online schools to save money on your education.

MSDN Chat on Indigo

Myself and Nasha(MVP) had hosted an MSDN web chat on Indigo. You can find the chat transcript here.

Iterator Pattern in C# - foreach statement

I hope you are aware of some in-built design patterns in C#. 

 Here is some code snippets.

      ArrayList arrayList = new ArrayList();

      int []array = {1,2,3,5};

      foreach(int i in array)

      {

            Console.WriteLine(i);

            arrayList.Add(i);   // Fill ArrayList

      }

      foreach(int i in arrayList)

      {

            Console.WriteLine(i);

      }

 When I opened the MSIL code (generated by C# compiler) got interesting results.

Compiler is replacing ArrayList foreach statement using  IEnumerable as given below.

     IL004f:  br.s       IL0065

    IL0051:  ldloc.s    CS$00000006$00000002

    IL0053:  callvirt   instance object [mscorlib]System.Collections.IEnumerator::getCurrent()

    IL0058:  unbox      [mscorlib]System.Int32

    IL005d:  ldind.i4

    IL005e:  stloc.3

    IL005f:  ldloc.3

    IL0060:  call       void [mscorlib]System.Console::WriteLine(int32)

    IL0065:  ldloc.s    CS$00000006$00000002

    IL0067:  callvirt   instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()

    IL006c:  brtrue.s   IL0051

 But C# array is handled using simple loop (br.s). Hence consider (better performance) simple array if you are using basic types (integer, string etc) , Since C# is implementing Iterator pattern using IEnumberable interface.