TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vijaya.nutakki
NA
23
0
StreamWriter
Dec 16 2003 6:03 AM
I want to open a new file and keep on appending the text depending on some condition. I have used this code but it is not appeneding properly It is giving some numbers in the output file if(index=="3") { files=new FileStream(filetext1.Text+"\\"+tgname+"\\"+"GlobalDeclarations"+".cs",FileMode.Append,FileAccess.Write,FileShare.ReadWrite); swriter=new StreamWriter(files); if(san==0) { swriter.WriteLine("using System;"); swriter.WriteLine("using System.IO;"); swriter.WriteLine("namespace "+ " "+tgname+"\r\n"+"{"); swriter.WriteLine("public class GlobalDeclarations"+"\r\n"+"{"); } } swriter.WriteLine(rtb2.Text); swriter.Close(); } Where am i wrong?
Reply
Answers (
1
)
Creating form templates has anybody got an answer?
struct with static array inside