Secret unveiled : Why is the Whidbey release numbered 8.0.50727.42

The versioning scheme is 8.0.YMMDD.NN and that explains 8.0.50727. The mystery is with the build number .42. There are three top contenders for it, and no prize of guessing the correct one People were so impressed with my blog that they borrowed the number from my blog title Visual Studio 2005 is the answer to the…

5

C#: String comparison guidelines and common usage

The recommendation for string comparison has been updated for Whidbey (Visual Studio 2005) and there is an excellent MSDN article on this. One of the highlights is the introduction of the clear cut enumeration that can be passed into most string comparison methods to indicate the kind of comparison you are trying to make.[Serializable][ComVisible(true)]public enum StringComparison{…

2

VS 2005 is out!!!!

The final word is out!!! This is a great time indeed for most developers out there, Visual Studio 2005 has been released!!!! I have been using Visual Studio for some time now, but all those years I was a customer of MS. This time I am in MS and in the DevTools team. Even though our product…

0

C# : Where do you define an enum

Frequently while designing classes that have methods which accept enums as parameters, a common question arrises on where to define the enum. Whether to define it inside the class or in the same level as the class. Lets consider a class Folder which has a method List. It accepts a enum Filter and based on…

14

C# 3.0 : using extension methods for enum ToString

In my previous blog I was trying to address the issue that when ToString is called on an enum the literal string for the enum constant is returned. Custom attributes can be used to tag localizable description string to the constants so that you can write functions that use reflection to get to the attribute…

8

C# : Enum and overriding ToString on it

I saw two posts on Enums today on Eric Lipperts and Chris Rathjen’s blog. Enums are significantly different from the other types and people run into unusal problems while working with them. C++ The CLI enum is considerably different from the native C++ enum and therefore you need to be careful how you define and use them in…

50

NonTech: Geekcity

Bangalore is famous world-over as the Indian version of Silicon city. I have never been to Silicon valley and so I’m not the right person to compare but a walk down some of the roads like the Airport road makes the comparison evident. Within a kilometer or two you’ll see offices (or buildings) of Texas Instruments, Intel, ADI, IBM,…

0

C#: Anonymous methods are not closures

<Edit: See the extended discussion at the end of which I conclude Anonymous methods are indeed lexical closures!!! > Anonymous methods in C# are just anonymous methods and do not represent true lexical closure. There are a lot of samples and code out there explaining why. I use a simple example in my mind to remember why…

27

Ruby: Webserver in 70 lines of code

<Updated the sources to add logging and default file index.html handling. Now the code is about 90 lines :(> I decided to write a http-server in Ruby on Windows to see how much code it requires as I have been reading about how Ruby gets your work done much easily and much faster. Some of…

21

C#: Comparison operator overloading and spaceship operator

Lets consider I have a class Employee which has  Name and JobGrade fields. I want to overload the comparison operators for this class so that it can participate in all types of comparison including <. <=, ==, >=, != and Equals. I want to translate the comparison in-between two Employee objects to be a comparison…

16