Hi Just started using c# to do a task I usually use Perl to do and hit
a limit in my knowledge :-)
I have a program which reads from a large text file, extracts certain
lines then gets a string from these lines.
Question
If the object I extract is in the form of a number how can I cast it
into a number so I can prerform mathematical operations on it ?
The following code:
foreach (Match theMatch in theMatches1)
{
if (theMatch.Length !=0)
{
Console.WriteLine("The match is
{0}",theMatch.ToString());
Console.WriteLine(theMatch.Groups["prob"]);
Console.WriteLine("Picking out the number {0} ",
theMatch.Groups["prob"]);
}
}
Gives me the following output:
The match is -0.9454 <s> The 0.1170
-0.9454
Picking out the number -0.9454
How can I turn theMatch.Groups["prob"] into say a double
TIA Paul