Advertisement

Structs (Value Types)

  • Eric Gunnerson

Abstract

Classes are used to implement most objects. Sometimes, however, it may be desirable to create an object that behaves like one of the built-in types (such as int, float, or bool )—one that is cheap and fast to allocate and doesn’t have the overhead of references. In that case, you can use a value type, which is done by declaring a struct in C#.

Keywords

Class Instance Reference Type Member Function Reference Semantic Point Point 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Eric Gunnerson 2012

Authors and Affiliations

  • Eric Gunnerson

There are no affiliations available

Personalised recommendations