¡@

Home 

c# Programming Glossary: randomobject

Casting vs using the 'as' keyword in the CLR

http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr

Don't do this Bad code checks type twice for no reason if randomObject is TargetType TargetType foo TargetType randomObject Do something.. if randomObject is TargetType TargetType foo TargetType randomObject Do something with foo Not only is this checking twice but it.. checking twice but it may be checking different things if randomObject is a field rather than a local variable. It's possible for the..