Property | Value |
---|---|
Id | MD0011 |
Category | Performance |
Severity | Warning |
const string arg = "hello";
var dict = new Dictionary<string, string>();
if (dict.TryGetValue(arg, out var _)) // MD0011
{
// Do something here
}
const string arg = "hello";
var dict = new Dictionary<string, string>();
if (dict.ContainsKey(arg))
{
// Do something here
}