c# - How to call TypeConverter.ConvertTo or ConvertToString with InvariantCulture but without implementing ITypeDescriptorContext -
in convert method wrong number separators when use typeconverter.converttostring(object)
because system in german. there overload method looks this: typeconverter.converttostring(itypedescriptorcontext, cultureinfo, object)
.
is there smart way obtain itypedescriptorcontext
or option call method invariantculture
besides switching culture before , after?
you can pass null
parameter
typeconverter.converttostring(null, cultureinfo.invariantculture, object);
Comments
Post a Comment