Skip to content

Working with null #366

@ErikSchierboom

Description

@ErikSchierboom

How to handle null values? In general, they are widely used in C#, but are also a cause of pain due to the infamous null-reference exceptions. I think we should in general use exceptions when the input is invalid, as that is also what the .NET framework seems to do in most cases (int.Parse, etc.). We should use null when we want to indicate that no result could be found (e.g. when querying a collection for a value).

If we were to adopt this, that means that the phone-number tests should be using an exception instead of checking for null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions