Not implemented exception (ARCH706)
هذا المحتوى غير متوفر بلغتك بعد.
Key dotnet.codequality.not-implemented-exception · Severity warning · Category codequality · Principle LiskovSubstitution
Members that throw NotImplementedException mean a subtype does not honor its contract, leading to unexpected runtime crashes.
Incorrect
Section titled “Incorrect”public class CsvExporter : IExporter{ public void Export(Report report) { throw new NotImplementedException(); }}Correct
Section titled “Correct”public class CsvExporter : IExporter{ public void Export(Report report) { using var writer = new StreamWriter(report.Path); foreach (var row in report.Rows) writer.WriteLine(string.Join(',', row)); }}Actually implement the functionality; if a type is not yet supported, do not implement the interface or document the unsupported behavior explicitly.