Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# streamwriter

// The StreamReader are using the Namespaces: System and system.IO

using (StreamWriter sw = new StreamWriter("c:WriteLines.txt")) //path
{
  sw.WriteLine("Here goes the text");

}
Comment

streamwriter c#

using System.IO;

StreamWriter out = new StreamWriter("file.txt");
out.WriteLine("First line.");
out.WriteLine("Second line.");
out.WriteLine("Third line.");
out.WriteLine("Fourth line.");
out.WriteLine("Fifth line.");
out.Close();

//This will create a txt file in the debug folder.
/*U can set the path by using*/ "c:path"
Comment

PREVIOUS NEXT
Code Example
Csharp :: roman to number 
Csharp :: c# break from foreach method 
Csharp :: c# get application root path directory 
Csharp :: how to duplicate a clip in premiere pro 
Csharp :: unity print vs debug log 
Csharp :: joins List of strings 
Csharp :: public gameobject unity 
Csharp :: get text after word C# 
Csharp :: write last element of dictionary c# 
Csharp :: remove all array elements c# 
Csharp :: Convert DataTable to Dictionary in C# 
Csharp :: public tmpro text 
Csharp :: unity get game version 
Csharp :: HCF of list of number 
Csharp :: google script get time 
Csharp :: C# using variables inside strings 
Csharp :: c# list of properties from list of objects 
Csharp :: multiplication of long numbers 
Csharp :: c# tell if list object is empty 
Csharp :: c# convert dictionary object to string 
Csharp :: c# get the first 4 characters in the list 
Csharp :: change size of a unity object 
Csharp :: power of number 
Csharp :: how to destroy parent gameobject unity 
Csharp :: maclaurin series 
Csharp :: mvc refresh page from controller 
Csharp :: c# directory file 
Csharp :: mongodb c# batch find 
Csharp :: c# read double 
Csharp :: how to trim path in C# 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =