R
ratullloch_delthis
StreamWriter.WriteLine and ConsoleWriter.WriteLine Question tia sal22
Greetings All
I have two lines that work seperatly but I'm having trouble
mergeing the togther to export the combined version to a text file
Example:
Console.WriteLine(now.ToString("MM:dd:yyyy:hh:mm:ss.fff", ci));
gives me: 12:04:2010:07:27:15.018
please note: this only shows up on the Console I'm not sure how
to export this out to a text file correctly
StreamWriter.WriteLine(String.Format("{0}{1},{2}", SampleCount * SamplePeriod, "\t\t", CurrentValue));
gives me: 1 78.9098
I would like the data to be exported to a text file like
12:04:2010:07:27:15.018, 78.9098
I tried combining them like
StreamWriter.WriteLine(now.ToString("MM:dd:yyyy:hh:mm:ss.fff, {0}", ci,CurrentValue));
hopeing this would give me
12:04:2010:07:27:15.018, 78.9098
but it doesn't I think it's because the CurrentValue variable is a double but I thought the toString would convert it.
Any ideas
tia sal22
Greetings All
I have two lines that work seperatly but I'm having trouble
mergeing the togther to export the combined version to a text file
Example:
Console.WriteLine(now.ToString("MM:dd:yyyy:hh:mm:ss.fff", ci));
gives me: 12:04:2010:07:27:15.018
please note: this only shows up on the Console I'm not sure how
to export this out to a text file correctly
StreamWriter.WriteLine(String.Format("{0}{1},{2}", SampleCount * SamplePeriod, "\t\t", CurrentValue));
gives me: 1 78.9098
I would like the data to be exported to a text file like
12:04:2010:07:27:15.018, 78.9098
I tried combining them like
StreamWriter.WriteLine(now.ToString("MM:dd:yyyy:hh:mm:ss.fff, {0}", ci,CurrentValue));
hopeing this would give me
12:04:2010:07:27:15.018, 78.9098
but it doesn't I think it's because the CurrentValue variable is a double but I thought the toString would convert it.
Any ideas
tia sal22