Structs (Value Types)

  • Eric Gunnerson


Classes will be used to implement most objects. Sometimes, however, it may be desirable to create an object that behaves like one of the built-in types; one that is cheap and fast to allocate and doesn’t have the overhead of references. In that case, a value type is used, which is done by declaring a struct in C#.


Struct Point Class Instance Reference Type String Type Reference Semantic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Technically, structs are derived from System. ValueType, but that’s only an implementation detail. From a language perspective, they act as if they’re derived from System.Object.Google Scholar

Copyright information

© Eric Gunnerson 2001

Authors and Affiliations

  • Eric Gunnerson

There are no affiliations available

Personalised recommendations