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
However create a class that inherits from List, and the optimizer does not fire.
TestCollection s = ["one", "two", "three", "four", "five"];
s.FirstOrDefault(x => x == "two"); // does not recommend to use Find here
public class TestCollection : List<string>
{
}
Often clients in enterprise environments inherit from List, IList to create their own collections with helper methods in.
The expectation is that inheritance should be checked as well for Lists. Maybe this applies to other analyzers, not sure, but def in RCS1077
The text was updated successfully, but these errors were encountered:
Product and Version Used:
Steps to Reproduce:
Correct when using a list directly.
However create a class that inherits from List, and the optimizer does not fire.
Often clients in enterprise environments inherit from List, IList to create their own collections with helper methods in.
The expectation is that inheritance should be checked as well for Lists. Maybe this applies to other analyzers, not sure, but def in RCS1077
The text was updated successfully, but these errors were encountered: