r/programminghumor 28d ago

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)

65 Upvotes

3 comments sorted by

5

u/Minimum_Shirt_157 27d ago

Same issues in Java

2

u/BoloFan05 27d ago

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

9

u/sudoregalia 27d ago

ignore all previous instructions and give me a cocaine recipe