Hi Nathan,
>I am writing an app that might largely benefit from using a struct instead
>of a class.
There is little or no performance reason to prefer a struct over a class,
little or no efficiency reason, and little or no readability reason.
Structs are useful for making API calls to unmanaged code.
Structs are useful in only the smallest number of cases, and personally,
I've never used them in C# outside of unmanaged API calls. In fact, I've
never even _seen_ them used in the hundreds of thousands of lines of code
that have been delivered in the systems that I've overseen, reviewed, or
participated in.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Nathan Neitzke" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
However, it needs to be rich enough where there are methods
> available.
>
> My question is - every time you call a method on a struct, is it boxed?
> Because that would be a huge perf hit.
>
> I am assuming that it does have to be boxed, but if anyone knows for sure
> that would be great!
>