
Writing
Always Use the "as" Operator? No Thank You!
Use a cast instead of `as` when the type is expected, so a mismatch raises InvalidCastException. Use `is` when the type genuinely varies and keep only guards backed by a real case.

Topic
Choosing casts and type checks according to whether a mismatch is expected or a defect.
2 pages

Writing
Use a cast instead of `as` when the type is expected, so a mismatch raises InvalidCastException. Use `is` when the type genuinely varies and keep only guards backed by a real case.

Chapter
C# methods tell callers what they do through explicit visibility, truthful signatures, and returns that express action, query, and cardinality; their bodies orchestrate at one level.