rspec/rules/S2259/csharp/exception-code-debug-assert.adoc
2023-07-03 17:26:15 +02:00

10 lines
208 B
Plaintext

[source,csharp]
----
using System.Diagnostics;
public void Method(object myObject)
{
Debug.Assert(myObject != null);
myObject.ToString(); // Compliant: 'myObject' is known to be not null here.
}
----