Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

VB2010 -Numbers and globalization

$
0
0
To test a "globalized code" I have created three Windows7 users: english, italian and french, downloading the related languages and setting the related language properties.

The test code:

Code:

Dim Flag as String = "0.16"
 
 If Not IsNumeric(Flag.ToString(CultureInfo.InvariantCulture)) Then
    Debug.Print("Not Numeric Flag: " & Flag.ToString(CultureInfo.InvariantCulture) )
 End If

does print nothing for english and italian users... but for the french user the code returns:

Not Numeric Flag: 0.16

I don' understand why... the code is clear: "CultureInfo.InvariantCulture", the "dot" as decimal separator is numeric... or not?

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>