stringstream s;
s << myString << myInt << ...;
instead of
StringBuilder s;
s.Append(myString);
s.Append(myInt);
// ... a lot of Appends
No, but you can use String.Format to do a lot of that for you if you
want - and for individual strings you can always use +.
--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
SAdly, no. C# has equivalents of the more ugly C style formatting
instead. Many very lovely things in C++ are missing in C#, probably
because the C# developers were ignorant of them. The absence of
templates also makes for an ugly world, especially when it come to
containers, but I'm sure you already found that out for yourself...
Christian
HTH
--
Günther Makulik
Senior Developer
Sangat-Systems AG (http://www.sangat-systems.de/default_en.html)
"Jon Skeet" <sk...@pobox.com> wrote in message
news:MPG.17f104eca...@msnews.microsoft.com...
> SAdly, no. C# has equivalents of the more ugly C style formatting
> instead. Many very lovely things in C++ are missing in C#, probably
> because the C# developers were ignorant of them. ...
I *don't* think that this is the case. Check out the resumes of the guys
involved.
> ... The absence of
> templates also makes for an ugly world, especially when it come to
> containers, but I'm sure you already found that out for yourself...
Which will, it seems, be addressed in a future release... Although I've
found that the object heirarchy and boxing remove most of the ugliness -
what they leave is runtime type-checking and performance hits due to boxing.
No, you cant use operators as statements like you can in C++. An overloaded
operator will only be usable in an expression.
--
Arild Fines