CSharpFeeds - All your C# feeds in one place.

Wednesday, July 02, 2008

Why does C# always use callvirt?

by ericgu via Eric Gunnerson's Compendium : CSharp on 7/2/2008 7:22:00 PM

This question came up on an internal C# alias, and I thought the answer would be of general interest. That's assuming that the answer is correct - it's been quite a while. The .NET IL language provides both a call and callvirt instruction, with the callvirt being used to call virtual functions. But if you look through the code that C# generates, you will see that it generates a "callvirt" even in cases where there is no virtual function involved. Why does it do that? I went back through the lang ...

[ read more ]

Why does C# always use callvirt?

by Eric Gunnerson via Eric Gunnerson's Compendium : CSharp on 7/2/2008 7:22:00 PM

This question came up on an internal C# alias, and I thought the answer would be of general interest. That's assuming that the answer is correct - it's been quite a while. The .NET IL language provides both a call and callvirt instruction, with the callvirt being used to call virtual functions. But if you look through the code that C# generates, you will see that it generates a "callvirt" even in cases where there is no virtual function involved. Why does it do that? I went back through the lang ...

[ read more ]

IsNull Extension Method

by ssmith via Blog on 7/2/2008 4:00:44 PM

I'm strongly considering adopting the use of an IsNull extension method in my .NET 3.5 coding projects.  A quick search to see what others have to say about this revealed a new web site dedicated to extension methods, which includes this IsNull method ready to go: pubic static bool IsNull(this object source){ return source == null;} The String class supports the IsNullOrEmpty() method now, but you have to pass it your instance yourself.  This is another good candidate for Extension M ...

[ 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