Welcome to MSDN Blogs Sign in | Join | Help

October 2005 - Posts

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
Posted by abhinaba | 5 Comments
Filed under:

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
Posted by abhinaba | 2 Comments
Filed under:

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
Posted by abhinaba | 0 Comments
Filed under:

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
Posted by abhinaba | 11 Comments
Filed under:

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
Posted by abhinaba | 8 Comments
Filed under:

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++
Posted by abhinaba | 44 Comments
Filed under:

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
Posted by abhinaba | 0 Comments
Filed under:

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
Posted by abhinaba | 22 Comments
Filed under:

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
Posted by abhinaba | 18 Comments
Filed under: ,

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
Posted by abhinaba | 12 Comments
Filed under:

C#: How about borrowing some Ruby conditional expressions

After using Ruby for some time I have become quiet attached to its conditional statement syntax. In particular I like statement modifiers which allow you to tag conditional statements at the end of a normal statement. If C# supported this then in C# terms
Posted by abhinaba | 9 Comments
Filed under: ,

C#: Fun with #line directive

#line pre-processor directive, though not commonly used is very interesting. This directive makes the compiler report line numbers for source files differently. If you have the directive #line 1 on the 3nd line of a source file then the compiler will
Posted by abhinaba | 5 Comments
Filed under:

C#: CIL supports overloading by return type

C# and most other languages that allow method overloading do not allow overloading by return type. What this means is that methods can be overloading only if they differ by parameters. So the following code will not compile as the methods differ only
Posted by abhinaba | 9 Comments
Filed under:

C#: structs and Interface

The fact that a struct can implement an interface is well known and so is the fact that casting a value type into an interface leads to boxing of the value type. This is because methods in interfaces are defined as virtual and to resolve virtual references,
Posted by abhinaba | 16 Comments
Filed under:

C#: try and retry

In many situation when something fails (exception is thrown) in the try block you want to retry that again. This could be a network timeout exception, or some other resource unavailability where you expect the same piece of try block code to succeed if
Posted by abhinaba | 17 Comments
Filed under: ,
 
Page view tracker