Guest User

Untitled

a guest
Nov 20th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. struct TestA
  2. {
  3. public int val1;
  4. }
  5.  
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. TestA[] A = new TestA[10];
  11.  
  12. // case 1
  13. A[0].val1 = 1;
  14.  
  15. // case 2
  16. var t = A[0];
  17. t.val1 = 2;
  18.  
  19. Console.WriteLine("val1 : {0}", A[0].val1);
  20. }
  21. }
Add Comment
Please, Sign In to add comment