How about this for a new rule?
AV1526 or AV2201: Prefer language syntax over explicit calls to underlying implementations
Prefer:
(string, int) tuple = ("", 1);
rather than:
ValueTuple<string, int> tuple = new ValueTuple<string, int>("", 1);
Prefer:
rather than:
Nullable<DateTime> startDate;
Prefer:
if (startDate != null) ...
rather than:
if (startDate.HasValue) ...
Prefer:
if (startDate > DateTime.Now) ...
rather than:
if (startDate.HasValue && startDate.Value > DateTime.Now) ...
How about this for a new rule?
AV1526 or AV2201: Prefer language syntax over explicit calls to underlying implementations
Prefer:
rather than:
Prefer:
rather than:
Prefer:
rather than:
Prefer:
rather than: