SHANTA
4
Q:

c# variable

/*int*/int myNum = 5;
/*doube*/ double myDoubleNum = 5.99D;
/*char*/ char myLetter = 'D';
/*bool*/ bool myBool = true;
/*string*/ string myText = "Hello";
14
// All types of variables
int MyNumber = 2; // A number
float MyDotNumber = 2.2; // A Number with decimals
string MyText = ("Hello World") //Text
bool YesOrNo = true; //True or False

// Formats

(Type) (Name) = (Value);
E.g:
int NameOfVariable = (Value depending on type)
6
 int variable;
6
public varible nameofvarible;//In Unity to esablish varible new slot should appear in the script componit and drag what element you want
0

New to Communities?

Join the community