Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- public class Calculator
- {
- int sum;
- int[] EvenArray;
- List<int> evenNumbers = new List<int>();
- string[] randomNames = new string[10];
- //This line gives an complie time error, as randomNames doesn't exist in current context
- randomNames[0]="Savresh";
- }
- private void MyMethod() {
- randomNames[0] = "Savresh";
- }
Add Comment
Please, Sign In to add comment