Guest User

Untitled

a guest
Jan 16th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. using System;
  2.  
  3. using System.Collections.Generic;
  4.  
  5. using System.Linq;
  6.  
  7. using System.Text;
  8.  
  9. using System.Threading.Tasks;
  10.  
  11. public class Calculator
  12. {
  13. int sum;
  14.  
  15. int[] EvenArray;
  16.  
  17. List<int> evenNumbers = new List<int>();
  18.  
  19. string[] randomNames = new string[10];
  20.  
  21. //This line gives an complie time error, as randomNames doesn't exist in current context
  22.  
  23. randomNames[0]="Savresh";
  24. }
  25.  
  26. private void MyMethod() {
  27. randomNames[0] = "Savresh";
  28. }
Add Comment
Please, Sign In to add comment