This page is a work in progress.You can help improve it. →

Terminology

TermDefinition
VariableAn identifier for a value our program needs to keep track of. Can be any data type.
Declaring VariablesThe act of typing out the variable data type and name.
Variable TypeThere are many different data types of variables in C# including: strings, characters, integers, decimals, booleans, etc.
stringGeneral written text ie. a Name, or Sentence. Strings are enclosed by " For example: string myName = "Bob";
characterGeneral written text character (Unicode Character) ie. a letter: a. Characters are enclosed by ' For example: char myInitial = 'B';
integerMost commonly written whole numbers ie. 1, 2, 3, 27 with a range from -2,147,483,648 to 2,147,483,647. For example: int myNumber = 365;
longA whole number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. For example: long myLongNumber = 9223372036854775806;
decimalA number that is not a whole number ie. 1.9. For example: dec myNumber = 1.9;
floatA 32 bit floating point value that has an approximate precision of 6-9 digits or a number that is also not a whole number ie. 3.141592. For example: float myNumber = 3.141592;
doubleA 64 bit floating point value that has an approximate precision of ~15-17 digits or a number that is also not a whole number ie. 3.14159265359. For example: double myNumber = 3.14159265359;
booleanUsed in logical operations and is a True or False value For example: bool isMyComputerOn = True;
byteUsed when representing a raw chunk of data (values from 0 to 255). For example: byte myByte = 255;
varGeneral variable declaration and C# assumes the variable type dependent on what you set the variable to. For example: a string var myName = "Bob"; or an integer var myNumber = 1; or a decimal var myNumber = 1.1;
indexStarts at 0 and denotes the exact position of the item, and can be accessed using [] on a string. For example: sentence[0] will retrieve the first character.
.LengthThis is a way to retrieve the length property of a variable. Most generally used with strings. For example: sentence.Length;
DateTimeDateTime is a specialized class to store the date and time. A DateTime is a Year, Month, Day, Hour, Minute, Second, and Millisecond. For example: var rightNow = DateTime.Now;
© 2017 - 2021; Built with ♥ in St. Petersburg, Florida.