Skip to content

Instantly share code, notes, and snippets.

@hk1ll3r
Created February 18, 2020 00:13
Show Gist options
  • Select an option

  • Save hk1ll3r/1a17f1f3c2c97bb843393fb3536a3ae7 to your computer and use it in GitHub Desktop.

Select an option

Save hk1ll3r/1a17f1f3c2c97bb843393fb3536a3ae7 to your computer and use it in GitHub Desktop.
public static class GenericToStringExts {
public static string ToStringExt<T>(this List<T> list) => "[" + string.Join(", ", list) + "]";
public static string ToStringExt<T>(this List<List<T>> listOfLists) => "[" + string.Join(", ", listOfLists.Select(l => l.ToStringExt())) + "]";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment