Is it challenging, or is it easy?
-
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take Exception -
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionQuote:
Challenging or easy
How about both?....Cheasy. :)
"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
-
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionMarc Clifton most definitely did NOT write:
enum DifferentType { long WeInt = 1, short creat = 2.345 }
I think I'm getting it ... Yep, it's 7-letters, the first one's an 'S', it definitely ends in "UM" ... (apologies to anyone who doesn't follow the CCC threads)
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
-
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionThat is broken for sure - although technically not. However, it does make me think why don't we just use a readonly, const, static, whatever, class full of values as they (sort of) show in a later example instead of an enum? ...and no casting required. Is it really much of a performance hit, if any?
- I would love to change the world, but they won’t give me the source code.
-
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionWell, that enum is just wrong. Will that even compile?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Well, that enum is just wrong. Will that even compile?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionBy unhappy coincidence, I've just finished writing a section for a style guide that tells people never to say that something is difficult, challenging, complicated, etc. -- because, if you do, people will believe it, and it will become a self-fulfilling prophecy.
Marc Clifton most certainly did not write:
enum DifferentType {
long WeInt = 1,
short creat = 2.345}Well, at least they've proven that they can count up to five -- but not much else.
I wanna be a eunuchs developer! Pass me a bread knife!
-
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take Exception -
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionIt's easy. Unless you're doing it wrong, in which case it's challenging.
-
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionWow... and with a slogan of "Take your skills to the next level" I'm just wondering what level they speak of?
Technician 1. A person that fixes stuff you can't. 2. One who does precision guesswork based on unreliable data provided by those of questionable knowledge. JaxCoder.com
-
Well, that enum is just wrong. Will that even compile?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013#realJSOP wrote:
Will that even compile?
Hell no. Not now, not in 2016 when that post was written.
Latest Articles:
Microservices: Myth, Madness, or Magic I Take Exception -
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionProbably the best part of that sewage backup posing as an article, is the single nonsequiter of a comment at the end. X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| X| &n
-
Wow... and with a slogan of "Take your skills to the next level" I'm just wondering what level they speak of?
Technician 1. A person that fixes stuff you can't. 2. One who does precision guesswork based on unreliable data provided by those of questionable knowledge. JaxCoder.com
-
Marc Clifton most definitely did NOT write:
enum DifferentType { long WeInt = 1, short creat = 2.345 }
I think I'm getting it ... Yep, it's 7-letters, the first one's an 'S', it definitely ends in "UM" ... (apologies to anyone who doesn't follow the CCC threads)
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
PeejayAdams wrote:
I think I'm getting it ... Yep, it's 7-letters, the first one's an 'S', it definitely ends in "UM" ... (apologies to anyone who doesn't follow the CCC threads)
...and loving it.
Michael Martin Australia "I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible." - Mr.Prakash One Fine Saturday. 24/04/2004
-
This is the side effect of "You must use enums for comparisons so that the code is maintainable." code review comments.
I hate this kind of dogmatic crap. What the hell is wrong with a define, in upper case for comparisons?
-
Found this gem:
Quote:
Getting an int value from enum can be challenging in C#. However, it can easily be done by using the following code:
OK, which is it? Challenging or easy? And a horrid discussion of why it can be challenging continues on Learn C# - How To Get Int Value from Enum[^] with this code example:
enum DifferentType {
long WeInt = 1,
short creat = 2.345
}That leaves me speechless. It's broken and borked on so many levels. :wtf:
Latest Articles:
Microservices: Myth, Madness, or Magic I Take ExceptionOMG, code in the Lounge, will the un go dark next? Isn't Ord(MyEnumVar) easier?