I am looking at some of my professor’s code for him while he is on Holiday and i came across this unreferenced class. Can someone please explain what T represents and possibly how to instantiate a class such as this?
public class RowToObject<T> where T : new()
Tis anything with a public parameterless constructor as constrained by:where T : new()To instantiate it, provide a type for
Tthat has a public parameterless constructor:var myRowToObject = new RowToObject<AnotherClass>();As for how it’s intended to be used in your code-base, no idea! 🙂