'Odd behavior from Visual Studio 2022. Can anyone explain?
I have a blazor server app in .netcore 6. I have a code block
if (iDiscountTotal != null && !string.IsNullOrEmpty(iDiscountTotal) && iDiscountTotal != "$0.00")
{
discountCounter += 1;
}
Now anywhere in that document (even in different methods) I do a try catch or an if and when I enter the brackets and hit enter, it grabs the $0 from my string and puts it into the code block and scrolls up the document. like so....
if (iDiscountTotal != null && !string.IsNullOrEmpty(iDiscountTotal) && iDiscountTotal != ".00")
{
discountCounter += 1;
}
try
{
$0
}
Anyone know what's going on? Might be worth noting if I take the $ out then all it does is scroll up to the top of the code but I need the $ and it is still annoying. Control Z puts the $0 back but scrolls up the page again so I have to find my block again.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
