Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to make a c# variable

// In C# And Other Programming Languages, You First Start With A Variable Type.
// If You Want To STORE Whole Numbers, There Is A Keyword For That. Its Called: int
// Int Stands For Integer. Now If You Want A Number With Decimals, There's Also A Keyword For That.
// Its Called: float : Float Stands For Floating Point Number or Decimal Point Number.
// Now Another REALLY Important One Is: string : A String Variable Contains Strings Of Text.
// Okay, So Those Are The Most Important Variable Types. Don't Be OverWhelmed Since I Was Just Really Going In-Depth.
// Now Lets Create A Variable! First Up, Our Variable Type... int!
int
// Now The Name... hmmm... MyVariable!
int MyVariable
// And To Set It To A Number, A WHOLE Number We Have To Use An EQUAL Sign.
int MyVariable = 10
// And Then A Semi-Colon!
int MyVariable = 10;
// Boom! You Created A Variable! Again, Don't Be OverWhelmed! Since I Was Just Really Going In-Depth.
Source by www.w3schools.com #
 
PREVIOUS NEXT
Tagged: #variable
ADD COMMENT
Topic
Name
1+5 =