You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Diagnostic ID: CA1859: Use concrete types when possible for improved performance
Analyzer source
SDK: 9.0.101
Describe the bug
When a method's return type is object and the returned value is an anonymous type (new { Name = "Alex" }) the analyzer suggests changing the method's return type from object to <anonymous type: string Name>. Of course, this return type is invalid.
Analyzer
Diagnostic ID: CA1859:
Use concrete types when possible for improved performance
Analyzer source
SDK: 9.0.101
Describe the bug
When a method's return type is
object
and the returned value is an anonymous type (new { Name = "Alex" }
) the analyzer suggests changing the method's return type fromobject
to<anonymous type: string Name>
. Of course, this return type is invalid.Steps To Reproduce
Expected behavior
Shouldn't trigger the CA1859 rule.
Actual behavior
Triggers the CA1859 rule.
The text was updated successfully, but these errors were encountered: