04 June 2007

YATIDK #2

Continuing the trend of yet another thing I didn't know (but probably should have):

I had always done:



Object o = ...

if (o.Type() == typeof(string))

{

   blah...

}



when i could have been doing:



Object o = ...

if ( o is string)

{

    blah...

}


Labels: ,

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home