For primitive types, fastest is probably to switch on Type.GetTypeCode