No, Resharper, I won't be doing that
-
http://i.imgur.com/9B0LpiX.png
No points for guessing what happens when you do.
-
Without context, it's not really clear what TRWTF is…
-
Convert.ToString(string)
seems useful to you?
-
For when I'm not quite sure.
-
Convert.ToString(string)
seems useful to you?
Well no, but then given there's alsoString.ToString()
andConvert.ToInt32(Int32)
and stuff, it's not surprising it's there.Anyway, the compiler'll optimise it away as a
NOP
.
-
Seen elsewhere...
Status: I just typed *1= into my calculator. Off to get more coffee...
-
Convert.ToString(string) seems useful to you?
Depends on what type is string variable. FWIW it might be anything from byte array to tuple of 4-dimensional vectors.
-
there's also String.ToString()
string
is anobject
and as such has to implement (or inherit) it.Convert.ToInt32(Int32)
I suppose that's an optimization - otherwise it would fall into the general
Convert.ToInt32(object)
basket.it's not surprising it's there.
It's not. The surprising part is that it's suggested as a solution to an error. As in "How do I fix this code, o mighty red lightbulb?" "Umm... what if you convert that string to a string?" "Oh fuck off, you have no clue either."
-
Depends on what type is string variable.
That's a function signature, and as such specifies a type. Like
void doStuff(bool)
.
-
That's a function signature, and as such specifies a type. Like void doStuff(bool).
Hey just FYI, nobody here is telepathic. Try maybe putting the WTF in the FIRST POST instead of the 9th.
-
Hey just FYI, nobody here is telepathic.
Either it's a type, or I've just named my variable "string" and therefore am a bumbling idiot.
I'll be grateful if you all assume the former.
-
Either it's a type, or I've just named my variable "string" and therefore am a bumbling idiot.
I'll be grateful if you all assume the former.
I've seen enough code that assuming it's stupidly named is the safer bet. Bumbling idiot is optional.
-
You've used C# before, haven't you? If you didn't know
string
is a keyword by now, there's nothing we can do to help you.
-
Blakey was just front page trolling.
-
You've used C# before, haven't you? If you didn't know
string
is a keyword by now, there's nothing we can do to help you.
Not gonna stop people:string @string = "I am a string!";
-
The surprising part is that it's suggested as a solution to an error. As in "How do I fix this code, o mighty red lightbulb?" "Umm... what if you convert that string to a string?" "Oh fuck off, you have no clue either."
That's also the wtf that is missing from the original post. Having never resharpered, i had no idea what those were other than autosuggestions of some sort.
-
Hey just FYI, nobody here is telepathic. Try maybe putting the WTF in the FIRST POST instead of the 9th.
damn, blakey beat me to it.
-
You've used C# before, haven't you?
Yup.
If you didn't know string is a keyword by now, there's nothing we can do to help you.
I did know that.
And yet my personal knowledge has nothing to do with my point.
-
And yet my personal knowledge has nothing to do with my point.
So you're saying you don't use your personal knowledge when you post? That explains a lot...
-
And yet my personal knowledge has nothing to do with my point.
This is not a secret.
-
I am string.
-
that is annoying as hell. particularly because while not part of the name that @ is inseperable from the name or it turns back into the reserved keyword.
-