Having programmed in Python for the last year and now moving over to csharp, one of the things that irritated me about csharp was how it handled strings.
For example, in python, assigning a comma seperated object representation to a string variable would simply be:
var = “%s,%s,%s”%(obj1,ob2,ob3)
whereas in c#, it would be:
var = obj1.ToString()+”,”+obj2.ToString()+”,”+obj3.ToString()
This still pisses me off and I still haven’t found a more elegant way to do it and it’s only basic stuff.
The other is multiline strings.
eg, a multiline in python would simply be
var = “”"this is
a
multiline string”"”
in c#, until now, I’ve been using the longwinded way of:
var = “this is \n”
+”a \n”
+”multiline string”"
Until I’ve now discovered you can do it like:
var = @”this is
a
multiline string”
Wow, you learn something new everyday, how could I have not known this before, something so basic. I still prefer to code python and some things in c# and the .NET Framework really bug me but things are getting better