struct vs class

I was musing about if I should write a struct or a class today and a collegue pointed out, the obvious, that if I wanted to use it in any form of list or collection then a struct would need to be boxed. So there it is, a very simple way to help decide if you need a class or a struct. Sometimes you can’t see the wood for the trees.
 
Advertisements
This entry was posted in cSharp. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s