|
The Falmer were elves once and show some resemblance with orcs
I still think you're an orc from Mordor
|
|
|
|
|
The post below is basically a discussion on style. Something in which that MSDN is sadly lacking.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Yes and it is also ok. But I think you also remember similar questions/discussions here from new members and they will be send to hell...
[Edit]
Same happens also to me because years * rep < allowed
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Perfect use for a goto.
10 ASK Question$
20 GOTO hell
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Perhaps you (and several other people) should read the post before making assumptions on what it says. I know perfectly well the difference between String and string. That is not the question. The questions was about style - something suitably lacking in any requirement of technical thought for a Friday afternoon.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Perhaps you should think about String vs. string and int vs. Int32 are completely different things. Int32 is not an alias for int...
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Have some cheese with that whine?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Take your pacifier
modified 19-Jan-21 21:04pm.
|
|
|
|
|
PChar.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Friends don't let friends MSDN.
This space for rent
|
|
|
|
|
Now I feel bad, I hope I can ever make up for this again. I'm sorry to be that bad
modified 19-Jan-21 21:04pm.
|
|
|
|
|
When writing my C# code I was in the habit of using string (all lowercase) for strings declarations, etc. and String (capitalized) for method calls such as String.Empty and String.Format just as a sort of aide memoir that I was calling an object method.
As I started to create String extension methods I reviewed this habit of mine and decided this was a pointless differentiation and switched to just using string all the time. At the same time I decided that my using Int32 for methods such as Int32.TryParse and just int in declarations, etc. was also pointless and perhaps confusing to others and so switched to using int all the time instead.
It all compiles to the same IL code anyway so it was just a matter of style really.
What do you think?
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
I used to think that String referred to a class, whereas string was just a simple type. I believe at some point in the past this was the case?? However, I now just use the lower case variant for simplicity.
Get me coffee and no one gets hurt!
|
|
|
|
|
Cornelius Henning wrote: I believe at some point in the past this was the case??
Nope, never. It's just an alias.
string
Visual Studio .NET 2003
The string type represents a string of Unicode characters. string is an alias for System.String in the .NET Framework.
|
|
|
|
|
And now, is it important?
modified 19-Jan-21 21:04pm.
|
|
|
|
|
|
Could it be that you are confusing this with Java? .Net never had primitive types. One of the most important differences when the Java guys still dismissed c# as a bad copy of Java.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Quote: Could it be that you are confusing this with Java? No. I never studied Java. I probably was just confusing it with.....
Get me coffee and no one gets hurt!
|
|
|
|
|
.Net really never had primitive types, but down below I just heard that the line between the classes and the aliases as value types is not drawn as clearly as I believed.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
I also prefer the differentiation, and I know other Code Projectors have said the same thing.
I dislike the aliases and I'd rather they weren't built in -- let the user define them as required.
What I find crazy is that when specifying the underlying type for an enumeration, you must use the alias.
And think I recall that there's a place where you mustn't use the alias.
|
|
|
|
|
PIEBALDconsult wrote: What I find crazy is that when specifying the underlying type for an enumeration, you must use the alias.
Not if you're using the Roslyn (C# 6 / VS2015) compiler:
enum Foo : Int32
{
Bar,
Baz,
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
No thanks. I prefer to write backward-compatible code unless there's a real reason to do otherwise.
|
|
|
|
|
There is a tiny difference, remember? Classes are reference types while the aliases are made to appear like value types for convenience.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Classes are reference types but Int32 is a struct
|
|
|
|
|
That explains it. Then I'm right what String and string are concerned, but wrong about Int32 and int.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|