Lost Password?


  #31 (permalink)  
Old 08-31-2008, 01:38 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: C# Tutorial: Writing Text Files

You're welcome!
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #32 (permalink)  
Old 09-17-2008, 04:25 PM
Brumo Brumo is offline
Newbie
 
Join Date: Sep 2008
Posts: 6
Rep Power: 0
Brumo is on a distinguished road
Default Re: C# Tutorial: Writing Text Files

Yow, Thanks for the tutorial

I am working on some thing atm but i cant find out why thsi write my information twice in the same row
Code:
String AllData = (ID) + (";") + (Name) + (";") + (Date) + (";") + (Time)

           StreamWriter sw = new StreamWriter(@"C:\TimeTable.csv", true); 
           string bufferOne = (AllData);
           sw.Write(bufferOne);
           sw.WriteLine(bufferOne);

           sw.Close();
           sw.Dispose();
It is returning the same information twice as i mentioned before but i dont know why because i use the variable only once in the writeline proces:s although i am appending the Timetable maybe that has to do with it something.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #33 (permalink)  
Old 09-17-2008, 04:30 PM
Brumo Brumo is offline
Newbie
 
Join Date: Sep 2008
Posts: 6
Rep Power: 0
Brumo is on a distinguished road
Default Re: C# Tutorial: Writing Text Files

Ah never mind the Post above

Found it 2seconds after i posted it xD
was the fault of the 2nd writeline

-Brumo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #34 (permalink)  
Old 09-17-2008, 04:31 PM
PlayaSkater's Avatar   
PlayaSkater PlayaSkater is offline
Learning Programmer
 
Join Date: Aug 2007
Location: Cruzer, US
Age: 17
Posts: 63
Rep Power: 5
PlayaSkater is on a distinguished road
Default Re: C# Tutorial: Writing Text Files

Quote:
Originally Posted by Brumo View Post
Yow, Thanks for the tutorial

I am working on some thing atm but i cant find out why thsi write my information twice in the same row
Code:
String AllData = (ID) + (";") + (Name) + (";") + (Date) + (";") + (Time)

           StreamWriter sw = new StreamWriter(@"C:\TimeTable.csv", true); 
           string bufferOne = (AllData);
           sw.Write(bufferOne);
           sw.WriteLine(bufferOne);

           sw.Close();
           sw.Dispose();
It is returning the same information twice as i mentioned before but i dont know why because i use the variable only once in the writeline proces:s although i am appending the Timetable maybe that has to do with it something.
Because you tell it to. sw.Write(bufferOne);
sw.WriteLine(bufferOne);
writes it twice. Remove one of those and try it again.

Btw, Xav, I got my previous problem fixed. It turns out that the code I had before worked. I don't know what happened, maybe I didn't build, but it's fine now.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #35 (permalink)  
Old 09-17-2008, 04:35 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: C# Tutorial: Writing Text Files

Great!
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #36 (permalink)  
Old 10-12-2008, 04:15 AM
tribun tribun is offline
Newbie
 
Join Date: Oct 2008
Posts: 4
Rep Power: 0
tribun is on a distinguished road
Default Re: C# Tutorial: Writing Text Files

good info..
thx xav..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #37 (permalink)  
Old 10-12-2008, 04:47 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: C# Tutorial: Writing Text Files

Welcome.
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
file, text, tutorial, writing



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Storing Images in MySQL with PHP Jordan PHP Tutorials 13 09-23-2008 07:11 PM
Text files travy92 Visual Basic Programming 1 10-07-2007 11:06 AM
How to style fonts of a text in a simple page? c0de Tutorials 3 09-15-2007 11:08 PM
HTML Basic Formatting clookid Tutorials 14 03-06-2007 04:10 PM
John's Java Tutorial Index John Java Tutorials 0 01-11-2007 04:05 PM


All times are GMT -5. The time now is 11:43 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads