I have various classes that implements IActiveRecord.
I want to have a method where I pass in a newly created class and assign ActiveRecord to the type of the class passed in.
I have tried the below but it does not compile for some reason.
Any ideas?
private void AddRecord<T>() where T : class, new()
{
IActiveRecord ActiveRecord = (IActiveRecord)T;
}