I know this may seem like a strange question, but it went on in my head for a while.
I know that the System.String type in C # is actually a class with a constructor that has a character array parameter. For example, the following code is legal and does not cause an error:
System.String s = new System.String("Hello".toCharArray());
My question is what makes it possible for the System.String class to accept an array of characters just like this:
System.String s = "Hello";
source share