Type T;
if (report.ReportType == 0) {
T = typeof(ReportTempHum);
} else if (report.ReportType == 11){
T = typeof(ReportVibration);
}
List<(Type)T> result = new List<(Type)T>();
I'm trying to assign a type into a List in terms of a reportType condition. But some errors.
How can I do this ?
Thanks in Advance!
Edit: Error; Severity Code Description Project File Line Suppression State Error CS0118 'T' is a variable but is used like a type