refactor: use null propagation operator

This commit is contained in:
Paul Pacheco 2019-04-14 11:04:23 -05:00
parent af0f79be14
commit 97f8bf6b26

View File

@ -65,7 +65,7 @@ public static bool ImplementsInterface(this TypeDefinition td, TypeReference bas
try try
{ {
TypeReference parent = typedef.BaseType; TypeReference parent = typedef.BaseType;
typedef = parent == null ? null : parent.Resolve(); typedef = parent?.Resolve();
} }
catch (AssemblyResolutionException) catch (AssemblyResolutionException)
{ {