Click here to Skip to main content
15,895,283 members
Home / Discussions / C#
   

C#

 
Questionsetup Pin
marwan_siala18-Apr-07 7:25
marwan_siala18-Apr-07 7:25 
AnswerRe: setup Pin
Obaid ur Rehman18-Apr-07 8:16
Obaid ur Rehman18-Apr-07 8:16 
GeneralRe: setup Pin
marwan_siala18-Apr-07 8:20
marwan_siala18-Apr-07 8:20 
AnswerRe: setup Pin
kubben18-Apr-07 8:28
kubben18-Apr-07 8:28 
GeneralRe: setup Pin
marwan_siala18-Apr-07 8:31
marwan_siala18-Apr-07 8:31 
QuestionWin Form & Web Form Control Update from a thread in Assembly Pin
zinc_z18-Apr-07 7:16
zinc_z18-Apr-07 7:16 
QuestionCreate/Open File options Pin
peterchen18-Apr-07 7:15
peterchen18-Apr-07 7:15 
AnswerRe: Create/Open File options Pin
Ed.Poore18-Apr-07 7:20
Ed.Poore18-Apr-07 7:20 
If you create a FileStream first using then you can specify what you want to happen to the file.

FileStream fs = new FileStream(path, fileMode);

Where FileMode can be:
FileMode.CreateNew (exception thrown if already exists)
FileMode.Create (overwrites an existing file)
FileMode.Open (exception thrown if does not exist)
FileMode.OpenOrCreate (if exists then opens, otherwise creates)
FileMode.Truncate (opens existing file but wipes it, presumably throws exception if file doesn't exist)
FileMode.Append (appends to existing file)

Once you have opened it you can pass this to the StreamWriter's constructor.



GeneralRe: Create/Open File options Pin
peterchen18-Apr-07 23:00
peterchen18-Apr-07 23:00 
QuestionProgramatic Edit of a DataGridView Pin
Pualee18-Apr-07 7:15
Pualee18-Apr-07 7:15 
AnswerRe: Programatic Edit of a DataGridView Pin
Patrick Etc.18-Apr-07 17:20
Patrick Etc.18-Apr-07 17:20 
GeneralRe: Programatic Edit of a DataGridView Pin
Pualee19-Apr-07 4:30
Pualee19-Apr-07 4:30 
QuestiontreeView Pin
mihksoft18-Apr-07 6:29
mihksoft18-Apr-07 6:29 
AnswerRe: treeView Pin
Ravi Bhavnani18-Apr-07 6:55
professionalRavi Bhavnani18-Apr-07 6:55 
GeneralRe: treeView Pin
mihksoft18-Apr-07 7:09
mihksoft18-Apr-07 7:09 
QuestionCan I create a class from a string name?? Pin
Saeed.39418-Apr-07 6:15
Saeed.39418-Apr-07 6:15 
AnswerRe: Can I create a class from a string name?? Pin
Ravi Bhavnani18-Apr-07 6:57
professionalRavi Bhavnani18-Apr-07 6:57 
GeneralRe: Can I create a class from a string name?? Pin
sarvesh.upadhyay18-Apr-07 18:33
professionalsarvesh.upadhyay18-Apr-07 18:33 
AnswerRe: Can I create a class from a string name?? Pin
Saeed.39418-Apr-07 18:40
Saeed.39418-Apr-07 18:40 
Questionworking with mouse Pin
duta18-Apr-07 6:03
duta18-Apr-07 6:03 
AnswerRe: working with mouse Pin
Ed.Poore18-Apr-07 7:20
Ed.Poore18-Apr-07 7:20 
QuestionHandling the Generic Variable in a Generic Method Pin
BradleyC18-Apr-07 5:23
BradleyC18-Apr-07 5:23 
AnswerRe: Handling the Generic Variable in a Generic Method Pin
Tarakeshwar Reddy18-Apr-07 5:52
professionalTarakeshwar Reddy18-Apr-07 5:52 
GeneralRe: Handling the Generic Variable in a Generic Method Pin
BradleyC18-Apr-07 10:13
BradleyC18-Apr-07 10:13 
QuestionRegistration of a file type in C# Pin
manustone18-Apr-07 5:00
manustone18-Apr-07 5:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.