Is this bad practice? why is this not in the standard library?

so I just saw this extension method in someone else's code:

public static T Copy<T>(this T @this) where T : ICloneable { return (T)@this.Clone(); } 

And I just can't figure out why this isn't in the standard library, this could save so much ugly downcasting!

by bentheiii via /r/csharp

Leave a Reply