Welcome to MSDN Blogs Sign in | Join | Help

July 2007 - Posts

Tail recursion on .NET

What's tail recursion If you know its nothing to do with any of your pet's tail then get onto the next section. Tail recursion is a special case of recursion where the last call in a method is a recursive ca ll. The major issue with recursion is that
Posted by abhinaba | 4 Comments
Filed under:

Easy way to modify IL code

Sometimes I try to write a little bit of IL code or modify bits and pieces here and there (specially modify IL generated from say C# code). The problem is writing up the complete IL that compiles into an exe is a pain (specially because my usage is to
Posted by abhinaba | 3 Comments
Filed under:

Type cast to generic type

The following question got posted to one of the internal DLs. Why does the following fail to compile. public interface A { } public class B : A { } public class C : B { } class D { public void f() { C c = new B () as C ; // Valid! } public void g<T>()
Posted by abhinaba | 4 Comments
Filed under:

Difference in conversion of anonymous method and lambda expression

Consider the following class delegate void Moo(int a, int b, int c); class A { public event Moo moo; } In case I want to create a handler for the moo event where I don't care about the 3 parameters needed by the event handler I can easily write it as
Posted by abhinaba | 4 Comments
Filed under:

A classic Daily WTF find

If you visit the Indian Railway site and press any of Ctrl/Alt keys it pops a message " Sorry, you do not have permission to press the key ". Hey, it's my keyboard and I have all the permission in the world to press whatever I want. This is exactly like
Posted by abhinaba | 0 Comments

Bestsellers list tells a lot

Right now on Amazon the third most selling book is 21 Pounds in 21 Days: The Martha's Vineyard Diet Detox . This says a lot about developed countries :)
Posted by abhinaba | 1 Comments
Filed under:

Writing in reverse

As a kid, like most other kids I used to spend time learning to do weird things like write in reverse (as text seen in mirror-reflection), or write flipped text so that the person seeing the paper from the other side could read it. Today I hit upon http://www.revfad.com/flip.html
Posted by abhinaba | 1 Comments
Filed under:
 
Page view tracker