Roslyn-analyzers: Port FxCop rule CA1026: DefaultParametersShouldNotBeUsed

Created on 1 Dec 2015  路  2Comments  路  Source: dotnet/roslyn-analyzers

Title: Default parameters should not be used

Description:

Methods that use default parameters are allowed under the CLS; however, the CLS lets compilers ignore the values that are assigned to these parameters. To maintain the behavior that you want across programming languages, methods that use default parameters should be replaced by method overloads that provide the default parameters.

Dependency: None

Notes:

Replace with a "breaking change" analyzer

FxCop-Port Resolution-Won't Fix Urgency-Soon

Most helpful comment

@lgolding, why is this rule deprecated? Issue https://www.reddit.com/r/csharp/comments/8xz6ez/method_overloading_vs_default_parameters/ no longer exists? Where is more complex information on this?

All 2 comments

@lgolding, why is this rule deprecated? Issue https://www.reddit.com/r/csharp/comments/8xz6ez/method_overloading_vs_default_parameters/ no longer exists? Where is more complex information on this?

I would also like more information on this

Was this page helpful?
0 / 5 - 0 ratings