Nullable<Int32> on heap or stack?

J

Jon Davis

Are nullable primatives stored on the stack, i.e. as a struct, or on the
heap as a reference type?

Jon
 
C

Carl Daniel [VC++ MVP]

Jon Davis said:
Are nullable primatives stored on the stack, i.e. as a struct, or on the
heap as a reference type?

A nullable type is itself a value type - no boxing occurs.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top