Who wrote the "suggestions" part of VS 2019?
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Well... I know many developer who seem to think the same.... :o
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
To be precise 'true' is not a constant in C# - So VS is right, you have not such thing as 'true' constant so you may as well spend your time more creatively than writing that stupid code and create one... and while you are at it do it globally...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Your question is easily answered. Consider the times we live in. The staff, more and more, will consist of people who's life is bound to a small hand-held device. The device, in it's most evil state, is used to transmit messages in non-English (FWIW, u c). So - this is the natural evolution of what's to come. Besides - as is their entire way of life, if you don't know something . . . Google it! It's much easier than learning anything. And now, with your question answered, you can enjoy a fine beverage.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
- public const bool True = false; public const bool False = true; 2) update code base 3) leave job
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Have you tried "TRUE" instead of "true"? ;)
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Solution - turn off the code suggestions feature
".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 -
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
But what is "true"? Is your "true" the same as mine?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
-
- public const bool True = false; public const bool False = true; 2) update code base 3) leave job
Wait! there is more!
public static readonly bool Maybe = new Rand().Next(2) == 0;
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
-
Wait! there is more!
public static readonly bool Maybe = new Rand().Next(2) == 0;
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
I'm a bad person....you're just evil :laugh:
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
They're just trying to help Javascript programmers integrate into the .NET community. Coming from "falsey" and "truthy" to hard false and true can be quite traumatic! :laugh:
Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
They're just trying to help Javascript programmers integrate into the .NET community. Coming from "falsey" and "truthy" to hard false and true can be quite traumatic! :laugh:
Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
I remember one FORTRAN programmer that didn't trust 'em. He used to write code like this:
if (a == b)
...
else if (a != b)
...
else
...:sigh:
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
I'm a bad person....you're just evil :laugh:
-
I remember one FORTRAN programmer that didn't trust 'em. He used to write code like this:
if (a == b)
...
else if (a != b)
...
else
...:sigh:
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Yeah, well.. It's up to you what you're going to use a screwdriver for. If you decide to clean your windows with it it is your own fault. If they'd know that their suggestion is right it would become a compiler error anyways.
I only have a signature in order to let @DalekDave follow my posts.
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
As millennials populate overseer positions with even younger ones under them, critical and "non critical" system failures will increasingly become more and more, the norm. like elevators and medical care. We're done for.
-
Solution - turn off the code suggestions feature
".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, 2013Exactly. And much of Resharper too. There's enough nanny state in the real world without it appearing in your IDE as well.
Regards, Rob Philpott.
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Well, you know that
true
could true for very large values offalse
, so you might as well plan ahead.Software Zen:
delete this;
-
And how did they escape from kindergarten? This time, my code looks like this:
XmlDocument xd = new XmlDocument(); xd.Load(@"D:\\Test Data\\author.xml"); xd.PreserveWhitespace = true;
And the final line has a "screwdriver" to show a "fix this suggestion" is available. And there are four options:
- Introduce a constant for "true"
- Introduce a constant for all occurrences of "true"
- Introduce a local constant for "true"
- Introduce a local constant for all occurrences of "true"
That's embarrassing. Visual Studio no longer considers
true
orfalse
to be constants in C# ... :-OSent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
Googled and got this : true and false are lowercase reserved keywords. So yeah, 'true' is not a constant. The suggestions aren't wrong.
-
Wait! there is more!
public static readonly bool Maybe = new Rand().Next(2) == 0;
A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
Actually literally laughed out loud like a maniachal despot in the office when I read this :laugh: