Peter Kiers
asked on
Check if a string has a (.) or (,) and convert it to its current culture
Hi,
What I would like is to check if a string contains a comman (,) or a point (.).
and if it does convert it to the current culture of the pc.
f.e:
the string contains: 17.7
But the current culture of the pc uses the (,)
then it must be converted to 17,7
Is this possible?
Who knows the answer and is willing to help me?
P.S: I do programming in Visual Studio 2010 with C#
Greetings,
Peter Kiers
What I would like is to check if a string contains a comman (,) or a point (.).
and if it does convert it to the current culture of the pc.
f.e:
the string contains: 17.7
But the current culture of the pc uses the (,)
then it must be converted to 17,7
Is this possible?
Who knows the answer and is willing to help me?
P.S: I do programming in Visual Studio 2010 with C#
Greetings,
Peter Kiers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Super it works great, thanks.
Peter
Peter
At least on one computer in our network (Windows 7) we were unable to force it to use dots as separators, causing it to be the only computer where calculations would give freakish results.