What is the logic/reason behind making
String s= new String(\"Hello World\");
Illegal in C#? The error is
The best over
It's .NET, not C#. Look at the constructors for System.String - none accept a System.String
So it's "illegal" for the same reason you can't construct a string with an int.
string x = new String(1);
Raymond Chen
The answer to "Why doesn't this feature exist?" is usually "By default features don't exist. Somebody has to implement them."
My guess is that every time someone sat down to implement this constructor. They thought about String.ToString's implementation and determined the constructor would logically undermine that method.