Casting generic type "as T" whilst enforcing the type of T
Read up on Constraints on Type Parameters in C#.
In this particular case, you must ensure that T is a class:
public abstract class SessionManager<T> where T : class, ISessionManager
Read up on Constraints on Type Parameters in C#.
In this particular case, you must ensure that T is a class:
public abstract class SessionManager<T> where T : class, ISessionManager