Revision 2772,
610 bytes
checked in by anlakane, 11 years ago
(diff) |
Testiprojekti.
|
Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using System.Linq; |
---|
4 | using System.Text; |
---|
5 | using System.Globalization; |
---|
6 | |
---|
7 | namespace Desipilkku |
---|
8 | { |
---|
9 | class Program |
---|
10 | { |
---|
11 | static void Main(string[] args) |
---|
12 | { |
---|
13 | NumberFormatInfo nfi = new NumberFormatInfo(); |
---|
14 | nfi.NumberDecimalSeparator = "."; |
---|
15 | |
---|
16 | double l = double.Parse("2.3", NumberStyles.Any, nfi); |
---|
17 | nfi.NumberDecimalSeparator = ","; |
---|
18 | double k = double.Parse("2,3", NumberStyles.Any, nfi); |
---|
19 | Console.WriteLine(l); |
---|
20 | Console.WriteLine(k); |
---|
21 | } |
---|
22 | } |
---|
23 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.