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 ...
No comments yet, be the first one to post comment.