refactor: use range operator for string manipulation in GetGenericTypeName method

This commit is contained in:
Jean Gatto
2025-02-12 15:41:21 -03:00
parent c3b2599eff
commit 53c0ef6fa3
@@ -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}>";
}
}