CSharpFeeds - All your C# feeds in one place.

Saturday, June 11, 2005

IS and AS operator

by jokiz via jokiz : C# on 6/11/2005 6:04:00 AM

Boxing and unboxing in C# has a performance cost and the use of the IS and AS operator in casting objects is trivial for me.  I thought before that:[code language="C#"]if (boxed is Person){    Person unboxed = boxed as Person;    //do something}[/code]is better than [code language="C#"]Person unboxed = boxed as Person;if (unboxed != null){    //do something} [/code]for the reason (which I believed before, without any basis) that the first one doe ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us