-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
If you put #nullable enable at the top of each file then you won't need to do this:
public Destination MapToDestination(this Source source)
{
source == null ? throw new IHateYouException(nameof(source))
: new Destination {
// ...
};
}
but instead can do this:
public Destination MapToDestination(this Source source)
{
new Destination {
// ...
};
}
public Destination? MapToDestinationNullable(this Source? source)
{
source == null
? null
: new Destination {
// ...
};
}
Metadata
Metadata
Assignees
Labels
No labels