Can't imagine this isn't a dupe but I can't seem find any previously matching questions.
I have a generic method
public T GetSetting<T>(Guid userId) where T : ISetting, new()
This in it's turn calls a generic method
public static ISetting CreateSetting<T>(IDictionary<string, object> data) where T:ISetting, new()
The signatures of T are exactly the same, yet the compiler requires me to cast the value like so:
return (T) BaseSetting.CreateSetting<T>(data);
Am I doing something wrong, or is this just a limitation of the framework?