Cannot implicitly convert type 'object' to 'T'. An explicit conversion exists (are you missing a cast?)
Following code can be use to convert your object to generic value.
T ret = (T)Convert.ChangeType(yourobject,typeof(T));
MELICK RAJEE BARANASOORIYA | Enterprise Architect
Cannot implicitly convert type 'object' to 'T'. An explicit conversion exists (are you missing a cast?)
Following code can be use to convert your object to generic value.
T ret = (T)Convert.ChangeType(yourobject,typeof(T));
Comments