🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #21861

StreamWriter.WriteLine and ConsoleWriter.WriteLine Question tia sal22

#21861
From: ratullloch_delthis
Date: Sat, 04 Dec 2010 21:27
29 lines
1902 bytes
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
Technical Details
Message-ID: <SmyKo.501772$rT.372096@en-nntp-06.dc1.easynews.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!feeder.erje.net!news.glorb.com!news2.glorb.com!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews!core-easynews-01!easynews.com!en-nntp-06.dc1.easynews.com.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!feeder.erje.net!news.glorb.com!news2.glorb.com!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews!core-easynews-01!easynews.com!en-nntp-06.dc1.easynews.com.POSTED!not-for-mail
Newsgroups: microsoft.public.dotnet.languages.csharp,alt.pl.comp.lang.csharp
From: ratullloch_delthis <ratullloch_delthis@gmail.com>
Subject: StreamWriter.WriteLine and ConsoleWriter.WriteLine Question tia sal22
Lines: 31
Message-ID: <SmyKo.501772$rT.372096@en-nntp-06.dc1.easynews.com>
X-Complaints-To: abuse@easynews.com
Organization: EasyNews, UseNet made Easy!
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 04 Dec 2010 21:27:14 GMT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit