Why Behavior changes when comparing strings on .NET 5+? #21575
Labels
dotnet/svc
Pri1
High priority, do before Pri2 and Pri3
product-feedback
Indicates issues that are related to product issues, not docs [org][type][category]
Hello,
When you change default values of the structure of .Net in version 5+ that means you are breaking the backward-compatible of c# and .net framework.
It's like you change the default value of bool to 'true'.
Why you should do this way and say to developers change all of your codes?
Why Developers have to change all of the default values of bool to false manually?
for example:
I'm using this code:
public bool Success {get;set;}
the default value of the Success property is false because of the default value of boolean in c# from version 1.0.
so when you change the default value to true in CLR, you have to tell thousands of developers to change this value to false manually like this way:
public bool Success {get;set;} = false;
Do you know how many codes have to change?
Is this design structure true? I want to see the .Net5 project manager !!
So I want to know why Microsoft is going to change default values in NET5+?
You are just wasting our time in this breaking change and you don't know how many codes we have to change for this. how many bugs we have to fix for this breaking changes?
examples to check:
example 2:
check this blow link pls:
https://docs.microsoft.com/en-us/dotnet/standard/base-types/string-comparison-net-5-plus
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: