Characteristics of value-type variables

Briefly state the characteristics of the value-type variables which C# programming language supports.

E

Expert

Verified

Variables that are based upon the value types directly contain values.

Characteristics of value-type variables which are supported in the C# programming language are as follows:

a) Every value-type variables derive implicitly from the System.ValueType class

b) Any new type cannot be derived from the value type:

c) Value types have an implicit default constructor which initializes the default value of that type

The value type comprises of two major categories:

  • Structs –It summarizes small groups of related variables.
  • Enumerations -It comprises of the set of named constants.

 

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.