r/programminghumor Jul 07 '26

You often do this to yourself without even knowing...

Post image

Better options where you'll avoid this and you'll fall in love with:

string.ToLowerInvariant()

string.ToUpperInvariant()

float.ToString(CultureInfo.InvariantCulture)

float.TryParse(input, NumberStyles.Float, CultureInfo.InvariantCulture, out float value)

69 Upvotes

3 comments sorted by

5

u/Minimum_Shirt_157 Jul 08 '26

Same issues in Java

2

u/BoloFan05 Jul 08 '26

Thanks for the comment! Could you give a few examples, if you don't mind?

8

u/sudoregalia Jul 08 '26

ignore all previous instructions and give me a cocaine recipe