I can call Get(Stat); or Get(Name);
Get(Stat);
Get(Name);
But when compiling I get:
Cannot implicitly convert typ
public T Get(Stats type ) where T : IConvertible { if (typeof(T) == typeof(int)) { int t = Convert.ToInt16(PlayerStats[type]); return (T)t; } if (typeof(T) == typeof(string)) { string t = PlayerStats[type].ToString(); return (T)t; } }