Types
Value Types and Reference Types
Value Types / Primitive Types
(double Sum, int Count) t2 = (4.5, 3); // tuple
Console.WriteLine($"Sum of {t2.Count} elements is {t2.Sum}.");
// Output:
// Sum of 3 elements is 4.5.Reference Types / Non-Primitive Types
string a = "hello";
string b = "h";
// Append to contents of 'b'
b += "ello";
Console.WriteLine(a == b);
Console.WriteLine(object.ReferenceEquals(a, b));Last updated