Skip to content

Commit

Permalink
simplify conditional expression
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Dec 24, 2023
1 parent 1bc3544 commit 4c5047a
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,5 @@ public static bool IsOverride(this PropertyInfo property)
public static bool IsAccessorReadOnly(this PropertyInfo property)
=> property is null
? throw new ArgumentNullException(nameof(property))
: property.GetMethod is null
? false
: property.GetMethod.IsReadOnly();
: property.GetMethod?.IsReadOnly() ?? false;
}

0 comments on commit 4c5047a

Please sign in to comment.