fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. char[] charArray = new char[3];
  8. charArray[0] = 'a';
  9. charArray[1] = 'b';
  10. charArray[2] = 'c';
  11.  
  12. string s1 = new string(charArray);
  13. string s2 = new string(charArray);
  14. Console.WriteLine(Object.ReferenceEquals(s1, s2));
  15. }
  16. }
Success #stdin #stdout 0.01s 131648KB
stdin
Standard input is empty
stdout
False