c#: structs

Structs are stored on the STACK, unlike classess, which are reference types and stored on the HEAP. Use of structs can have performance implications - sometimes good, but more often bad.

When you create a struct object using the new operator, it gets created and the appropriate constructor is called. Unlike classes, structs can be instantiated without using the new operator. In such a case, there is no constructor call, which makes the allocation more efficient. However, the fields will remain unassigned and the object cannot be used until all of the fields are initialized. msdn

.. what is a struct?

.. code: points

.. array of structs

.. 2-d array of structs

.. structs that have methods

.. a struct is a value (stack) memory type