File name matches type (ARCH713)
هذا المحتوى غير متوفر بلغتك بعد.
Key dotnet.codequality.file-name-matches-type · Severity info · Category codequality
Matching the file name to the primary type it contains makes the codebase easier to navigate and supports the one-type-per-file convention.
Incorrect
Section titled “Incorrect”public sealed class InvoiceCalculator{ public decimal Total(Invoice invoice) => invoice.Lines.Sum(l => l.Amount);}Correct
Section titled “Correct”public sealed class InvoiceCalculator{ public decimal Total(Invoice invoice) => invoice.Lines.Sum(l => l.Amount);}Rename the file to match the name of the primary type it contains.