short keyword in C# Last Updated : 22 Jun, 2020 Comments Improve Suggest changes Like Article Like Report Keywords are the words in a language that are used for some internal process or represent some predefined actions. short is a keyword that is used to declare a variable which can store a signed integer value from the range -32, 768 to 32, 767. It is an alias of System.Int16. Syntax: short variable_name = value; short keyword occupies 2 bytes (16 bits) space in the memory. Example: Input: num: 2 Output: num: 2 Size of a short variable: 2 Input: num = 20200 Output: num: 20200 Type of num: System.Int16 Size of a short variable: 2 Example 1: csharp // C# program for short keyword using System; using System.Text; class Prog { static void Main(string[] args) { // variable declaration short num = 2; // to print value Console.WriteLine("num: " + num); // to print size Console.WriteLine("Size of a short variable: " + sizeof(short)); } } Output: num: 2 Size of a short variable: 2 Example 2: csharp // C# program for short keyword using System; using System.Text; namespace Test { class Prog { static void Main(string[] args) { // variable declaration short num = 20200; // to print value Console.WriteLine("num: " + num); // to print type of variable Console.WriteLine("Type of num: " + num.GetType()); // to print size Console.WriteLine("Size of a short variable: " + sizeof(short)); // to print minimum & maximum value of short Console.WriteLine("Min value of short: " + short.MinValue); Console.WriteLine("Max value of short: " + short.MaxValue); // hit ENTER to exit Console.ReadLine(); } } } Output: num: 20200 Type of num: System.Int16 Size of a short variable: 2 Min value of short: -32768 Max value of short: 32767 Comment More infoAdvertise with us Next Article short keyword in C# S shivanisinghss2110 Follow Improve Article Tags : C# CSharp-keyword Similar Reads ushort keyword in C# Keywords are the words in a language that are used for some internal process or represent some predefined actions. ushort is a keyword that is used to declare a variable which can store an unsigned integer value from the range 0 to 65,535. It is an alias of System.UInt16. Syntax: ushort variable_nam 2 min read sbyte Keyword in C# Keywords are the words in a language that are used for some internal process or represent some predefined actions. SByte is a keyword that is used to declare a variable that can store a signed value between the range of -128 to +127. It is an alias of System.SByte. SByte keyword occupies 1 byte (8 b 2 min read var keyword in C# Keywords are the words in a language that are used for some internal process or represent some predefined actions. var is a keyword, it is used to declare an implicit type variable, that specifies the type of a variable based on initial value. Syntax: var variable_name = value; Example: Input: a = 6 2 min read Static keyword in C# static is a modifier in C# which is applicable for the following: ClassesVariablesMethodsConstructorIt is also applicable to properties, event, and operators. To create a static member(class, variable, methods, constructor), precede its declaration with the keyword static. When a member is declared 4 min read long keyword in C# Keywords are the words in a language that are used for some internal process or represent some predefined actions. long is a keyword that is used to declare a variable which can store a signed integer value from the range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. It is an alias of 2 min read Like