January 2003
Intermediate to advanced
896 pages
19h 58m
English
Parsing is the reverse of formatting, in that it consists of producing numeric or date values from strings such as 23.456. As a result, the concepts of format specifier and format provider discussed in the section "Formatting Strings for Output" earlier in this chapter also apply to parsing. All the .NET Compact Framework numeric types have a static Parse method that will parse strings to .NET Compact Framework types. You can parse any string to a numeric value, provided that it was produced or could have been produced by a format specifier. The following is a simple example of parsing:
string myString = "23.456"; double myDouble = double.Parse(myString); // myDouble will take the value 23.456
When parsing a numeric ...
Read now
Unlock full access