Try the FileMode enumerator:
FileStream fappend = File.Open("C:\\test.txt", FileMode.Append); // will append to end of file
FileStream fcreate = File.Open("C:\\test.txt", FileMode.Create); // will create the file or overwrite it if it already exists
More Related Contents:
- Type or namespace name does not exist [closed]
- Shared AssemblyInfo for uniform versioning across the solution
- VS2010 – How to automatically stop compile on first compile error
- How to make a tabbed window as in the picture using Visual C# (Studio 2010)
- Display lines number in Stack Trace for .NET assembly in Release mode
- Can’t view designer when coding a form in C#
- What is the difference between Debug and Release in Visual Studio?
- Does C# 8 support the .NET Framework?
- Detect target framework version at compile time
- Why we have both jagged array and multidimensional array?
- The name ‘ConfigurationManager’ does not exist in the current context
- How do I fix a .NET windows application crashing at startup with Exception code: 0xE0434352?
- Parsing Visual Studio Solution files
- Combining multiple Attributes to a single Attribute – Merge Attributes
- Visual Studio build fails: unable to copy exe-file from obj\debug to bin\debug
- How can I embed an application manifest into an application using VS2008?
- Request.UrlReferrer null?
- Visual Studio 2013 doesn’t discover unit tests
- Writing to output window of Visual Studio
- How can we change the background color of all other forms from one form?
- Create web service proxy in Visual Studio from a WSDL file
- Visual Studio – project shows up as “Miscellaneous Files”
- Why does TestInitialize get fired for every test in my Visual Studio unit tests?
- Symbol file not loading for debugging custom project in Visual Studio 2012
- How to capture mouse wheel on panel?
- Get types used inside a C# method body
- Service Reference Error: Failed to generate code for the service reference
- F5 or Start Debugging Button is Greyed Out for Winform application?
- WCF, Interface return type and KnownTypes
- Custom Color Palette in Visual Studio Color Property Editor