Value Type

noun

say it: “VAL-yoo TYP” /ˈvæljuː taɪp/

A C# type, such as int, decimal, bool or char, whose variable holds the value itself, so assigning or passing it makes a copy.

What is Value Type in C#?

Value Type — A type whose value is stored directly, including structs, enums, and built-in numeric types.

class Order
{
    int itemCount = 3;
    decimal price = 4.50m;
    char size = 'M';
    bool paid = true;
}

In a sentence

  • “int is a value type, so AddTouchdown(georgia) gets a copy and georgia stays 12.”

Level: Novice · More C# terms at this level

Updated