I have the following method with generic type:
T GetValue();
I would like to limit T to primitive types such as int, string, float
What are you actually trying to do in the method? It could be that you actually need C to implement IComparable, or someother interface. In which case you want something like
T GetObject where T: IComparable