?
=?ISO-8859-15?Q?Martin_P=F6pping?=
Hello,
does a String in C# have a maximum length?
I tried to write a ToString Method of my class containing a hashtable.
At the beginning of the method i defined a String "ret".
In every iteration of my hashtable I add the content with ret += "...".
After some time my programm crashes.
If i use Console.Writeln in every iteration instead of ret += ...,
then everything works fine.
So I guess it has something to do with a possible maximum length of a
string?
Regards,
Martin
does a String in C# have a maximum length?
I tried to write a ToString Method of my class containing a hashtable.
At the beginning of the method i defined a String "ret".
In every iteration of my hashtable I add the content with ret += "...".
After some time my programm crashes.
If i use Console.Writeln in every iteration instead of ret += ...,
then everything works fine.
So I guess it has something to do with a possible maximum length of a
string?
Regards,
Martin