Advertisement
jkuehlin

Change Plate Color - Value Reference Types

Nov 15th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace AvetisGhukasyanNotes
  5. {
  6. class MainClass
  7. {
  8. static void Main(string[] args)
  9. {
  10.  
  11. Plate plate = new Plate();
  12. plate.Color = "White";
  13.  
  14. ChangeColor(plate);
  15.  
  16. Console.WriteLine(plate.Color);
  17.  
  18. }
  19.  
  20. static void ChangeColor(Plate plateChangeTo)
  21. {
  22. plateChangeTo.Color = "Blue";
  23. }
  24.  
  25. }
  26.  
  27. class Plate
  28. {
  29. public string Color { get; set; }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement