What is the logic/reason behind making
String s= new String("Hello World");
Illegal in C#?
The error is
The best overloaded method match for `string.String(char*)’ has some invalid arguments
I’m not interested in the API docs, I am interested in why this is illegal.
Is is because of pooling static strings? like Java pools Integer(-128) to Integer(127) with horrendous results? ( of course strings too )
It would be rather pointless to use the constructor to create a new string based on another existing string – that’s why there is no constructor overload that allows this. Just do