refactor: use range operator for string manipulation in GetGenericTypeName method
This commit is contained in:
@@ -24,6 +24,6 @@ public static class GenericTypeExtensions
|
||||
var genericTypes = string.Join(",", type.GetGenericArguments().Select(t => t.Name).ToArray());
|
||||
|
||||
// Remove the backtick and append the generic arguments to the type name
|
||||
return $"{type.Name.Remove(type.Name.IndexOf('`'))}<{genericTypes}>";
|
||||
return $"{type.Name[..type.Name.IndexOf('`')]}<{genericTypes}>";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user