I am writing an application in VB.NET which will run on systems where the culture settings recognize comma (,) as the decimal marker, but I would like program to use the punctuation (.) as a decimal marker.
I know I can use the System.Globalization.CultureInfo.InvariantCulture
, but I don't want to bring this into every ToString()
operation that I do. I figure it must be possible to set the culture settings globally for the program on startup, but I don't know how.
I have tried this: I found a question here on stackexchange stating that
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture
can be used in C# and in my experience C# and VB.NET are pretty much the same, so I attempted to use this. I couldn't just reference Thread
so I figured I'd try
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture
and since I didn't know where to put it, I placed it in the Load method for the splash screen. Alas, that did not work for me.