I'm having a bit of a problem reading from a text file and converting to a double. Here is my partial script:
#region Variables
private double textDouble = 0;
private string path = @"C:\NTFiles\textfile.txt";
private System.IO.StreamWriter sw;
#endregion
protected override void OnBarUpdate( )
{
protected override void OnTermination ( )
{
Additional Info:
1. The text file will always have only one line
2. The script reads that one line, and deletes the text file contents
3. On termination, the script writes one value to the text file leaving the text file with just one line for the next time it runs.
4. As is, the content clearing and writing part work as they should. The problem is reading the text file and converting it to a double. The text file will have 1453.45 and the script will make the value of textDouble = 0.00.
All help is greatly appreciated.
Comment