Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# read file from path

string path = "C:UsersPublicTestFolderWriteText.txt";
// Read as a single string
string text = System.IO.File.ReadAllText(path);
// Read each line into a string array
string[] lines = System.IO.File.ReadAllLines(path);
Comment

c# read file current directory

var path = Path.Combine(Directory.GetCurrentDirectory(), "fileName.txt");
Comment

c# read file from directory

string[] files = Directory.GetFiles(tx_path1.Text);

for(var i = 0; i < files.Length; i++)
{

}
Comment

PREVIOUS NEXT
Code Example
Csharp :: string isnullorempty vs isnullorwhitespace 
Csharp :: xamarin forms open new page on button click 
Csharp :: defaultrequestheaders.authorization basic auth 
Csharp :: capitalize c# 
Csharp :: how to do a messagebox in c# 
Csharp :: failed to read the request form. missing content-type boundary .net core 
Csharp :: get diff btw datetimes two C# 
Csharp :: total months between two dates c# 
Csharp :: Unity Destroy gameObject upon collision 
Csharp :: change name of gameobject 
Csharp :: how to get integer value from textbox in c# 
Csharp :: how to look for substring in string in c# 
Csharp :: save byte array to file c# 
Csharp :: unity raycast 2d 
Csharp :: c# connect tcp 
Csharp :: get width of image unity 
Csharp :: How to take input on float in c# 
Csharp :: how to make text show a variable in unity 
Csharp :: debug.log 
Csharp :: c# OrderBy desc 
Csharp :: array sort c# 
Csharp :: c# round double 
Csharp :: how to make a enter in C# string 
Csharp :: raycasthit unity 
Csharp :: c# remove word from string 
Csharp :: checking if character is a digit or not in c# 
Csharp :: find how many digits a number has csharp 
Csharp :: override gethashcode 
Csharp :: how to show an arrya in c# 
Csharp :: c# select a row from datagridview by value 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =