Updated C# and .NET docs supplement (markdown)

James Groom 2023-02-08 03:44:51 +10:00
parent 0bf015e53f
commit 6b61be0476
1 changed files with 1 additions and 1 deletions

@ -22,7 +22,7 @@ see [feature matrix](https://github.com/TASEmulators/BizHawk/wiki/Available-C%23
There are two types of casts in C#: the C-style `(T) o` throws if the object is not of the desired type, whereas `o as T` evaluates to `null` if it's not of the desired type. There's no '?' in this `null`-producing operator (this is probably only confusing if you use Kotlin).
If an object being the wrong type is *exceptional*, throw an *exception* straight away. Having it reported as an NRE when there's no `null` in sight just delays debugging the problem.
If an object being the wrong type is *exceptional*, the method can't handle it gracefully, then throw an *exception* straight away. Having it reported as an NRE when there's no `null` in sight just delays debugging the problem.
## Type constraints (`where` clauses)