fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string s1 = "koko";
  8. string s2 = s1;
  9.  
  10. if(object.ReferenceEquals(s1, s2))
  11. {
  12. Console.WriteLine("Same refernce");
  13. }
  14. else
  15. {
  16. Console.WriteLine("different refernce");
  17. }
  18. }
  19. }
Success #stdin #stdout 0.02s 34752KB
stdin
Standard input is empty
stdout
Same refernce