C# Language Getting and setting array values


Example

int[] arr = new int[] { 0, 10, 20, 30}; 

// Get 
Console.WriteLine(arr[2]); // 20

// Set 
arr[2] = 100;

// Get the updated value
Console.WriteLine(arr[2]); // 100