Enable CA1829: Use Length/Count property instead of Count() (#13925)

https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1829
This commit is contained in:
xtqqczze 2020-11-11 06:55:39 +00:00 committed by GitHub
parent 39205ca4de
commit bac51217d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -299,7 +299,7 @@ dotnet_diagnostic.CA1827.severity = warning
dotnet_diagnostic.CA1828.severity = warning
# CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1829.severity = suggestion
dotnet_diagnostic.CA1829.severity = warning
# CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
dotnet_diagnostic.CA1830.severity = warning

View file

@ -21,7 +21,7 @@ namespace mvc
{
public static void Main(string[] args)
{
if (args.Count() != 7)
if (args.Length != 7)
{
System.Console.WriteLine("Required: <CertificatePath> <CertificatePassword> <HTTPPortNumber> <HTTPSPortNumberTls12> <HTTPSPortNumberTls11> <HTTPSPortNumberTls> <HTTPSPortNumberTls12>");
Environment.Exit(1);