Skip to content

Commit 41b056e

Browse files
glihmglihm
andauthored
Fix typo in CS and VB code (#4575)
* Fix typo in CS and VB code * Precise the culture using the defined separators Co-authored-by: glihm <[email protected]>
1 parent 1c9b375 commit 41b056e

File tree

2 files changed

+4
-4
lines changed
  • samples/snippets
    • csharp/VS_Snippets_CLR_System/system.Decimal.Parse/CS
    • visualbasic/VS_Snippets_CLR_System/system.Decimal.Parse/VB

2 files changed

+4
-4
lines changed

samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Parse/CS/parse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private static void CallParseWithStylesAndProvider()
118118
CultureInfo provider;
119119

120120
// Parse string using " " as the thousands separator
121-
// and "." as the decimal separator.
121+
// and "," as the decimal separator for fr-FR culture.
122122
value = "892 694,12";
123123
style = NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands;
124124
provider = new CultureInfo("fr-FR");
@@ -141,7 +141,7 @@ private static void CallParseWithStylesAndProvider()
141141
// Unable to parse '892 694,12'.
142142

143143
// Parse string using "$" as the currency symbol for en-GB and
144-
// en-us cultures.
144+
// en-US cultures.
145145
value = "$6,032.51";
146146
style = NumberStyles.Number | NumberStyles.AllowCurrencySymbol;
147147
provider = new CultureInfo("en-GB");

samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Parse/VB/parse.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Module modMain
107107
Dim provider As CultureInfo
108108

109109
' Parse string using " " as the thousands separator
110-
' and "." as the decimal separator.
110+
' and "," as the decimal separator for fr-FR culture.
111111
value = "892 694,12"
112112
style = NumberStyles.AllowDecimalPoint Or NumberStyles.AllowThousands
113113
provider = New CultureInfo("fr-FR")
@@ -127,7 +127,7 @@ Module modMain
127127
' Unable to parse '892 694,12'.
128128

129129
' Parse string using "$" as the currency symbol for en-GB and
130-
' en-us cultures.
130+
' en-US cultures.
131131
value = "$6,032.51"
132132
style = NumberStyles.Number Or NumberStyles.AllowCurrencySymbol
133133
provider = New CultureInfo("en-GB")

0 commit comments

Comments
 (0)