In C++ it's recommended to have const-correctness everywhere. But since in .Net world, the string content cannot be changed, (new string will be created), do I still write String^ const?
A:
No. Just pass a handle to a string directly: method(String^ string)
Reed Copsey
2010-03-31 22:46:21
ok, what if in a method, I want to define a const string, would it be better that I put const there so anyone else would know it's a not-changed string?
AZ
2010-04-02 17:49:47