Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Non-trailing named arguments with C# 7.2
// C# 7.0
if (Enum.TryParse(weekdayRecommendation.Entity, ignoreCase: true,
result: out DayOfWeek weekday))
{
reservation.Weekday = weekday;
}
// C# 7.2
if (Enum.TryParse(weekdayRecommendation.Entity, ignoreCase: true,
out DayOfWeek weekday))
{
reservation.Weekday = weekday;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment