This tutorial is to help you understand arrays using the CSharp coding format.
Now if you do not know what a array is or used for read the spoiler below.
- A array is used the set more then one value to a variable.
- Arrays are used highly in encryption & decryption scripts.
- Arrays can be used for the application to add its self multiple variables depending on a file etc.
How to make and set values to an array:
A array is set as any other variable just with [] at the end.
In the [] is where you set the amount of values you would like the variable to store.
To set a value in each array you will do this.
NOTE: the system counts from 0 not 1 so always stay one behind.
Code:
Int ArrayName[3];
ArrayName[0] = 40;
ArrayName[1] = 37;
ArrayName[2] = 86;
This is a faster way i use to set values.
Code:
Int ArrayName[3] = {40, 37, 86};
How to set a number of values though a variable:
There is not much needed to explain how this works,
with basic knowledge of C# you will understand.
Code:
Int ArrayName[] = {37, 43, 54};
int i;
for(i=0; i<3; i++)
{
String Summary = "This Is Generated : " + ArrayName[i];
}