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
publicstaticvoidTest(){varregex=newRegex("blablabla");foreach(Matchmatchinregex.Matches("bbb"))// GCop659 Use 'var' instead of explicit type{vargroup=match.Groups["ccc"];if(group==null)Console.WriteLine("xxx");}}
After quick fix:
publicstaticvoidTest(){varregex=newRegex("blablabla");foreach(varmatchinregex.Matches("bbb")){vargroup=match.Groups["ccc"];// CS1061 'object' does not contain a definition for 'Groups' and no accessible extension method 'Groups' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) if(group==null)Console.WriteLine("xxx");}}
GCop659 must take into account duck typing.
The text was updated successfully, but these errors were encountered:
After quick fix:
GCop659 must take into account duck typing.
The text was updated successfully, but these errors were encountered: