3
shouts

More On Structs

posted by KodefuGuruKodefuGuru 279 days, 1 hour, 6 minutes ago
Wednesday, June 10, 2009 5:47:41 PM GMT

On Friday, I wrote a post that listed guidelines for when to use a struct rather than a class. A commenter of that blog entry asked me to elaborate on the 16-byte rule.

There is a special class in the .NET framework called ValueType. You can't actually inherit from this class nor can you use it as a generic constraint, but you can use it for variable and parameter declarations when you don't want to accept a reference type. There are two type of constructs that inherit from this class: structs and ...

category: Architecture | clicked: 3 | | source: www.kodefuguru.com | show counter code

No comments yet, be the first one to post comment.

To post your comment please login or signup