Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# read file by line

using (var file = new StreamReader(fileName)) {
	string line;
	while((line = file.ReadLine()) != null)  
	{  
		System.Console.WriteLine(line);
	}  
}
Comment

c# code to read txt file line by line and split

string lines = File.ReadAllText(path);
string [] split_arr = lines.Split(';')//files containt ; seprated values
  foreach(string l in split_arr)
  {
    Console.WriteLine(l);
  }
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to load file from resources in c# 
Csharp :: Kill System Process in C# 
Csharp :: custom click event wpf button 
Csharp :: c# lists 
Csharp :: data annotations in asp.net core 
Csharp :: unity unfreeze position in script 
Csharp :: C# fileinfo creation date 
Csharp :: set current date to textbox in asp.net 
Csharp :: how to make a string a list of characters c# 
Csharp :: yield c# 
Csharp :: primitive types c# 
Csharp :: unity2d movement 
Csharp :: asp .net core 3 mvc select with default value 
Csharp :: Print arraylist values to console unity 
Csharp :: nexo price 
Csharp :: switch statement c# example 
Csharp :: callling class c# 
Csharp :: set file to read only C# 
Csharp :: unity 2d enemy patrol script 
Csharp :: slither io hack 
Csharp :: how to have referecne to script in unity 
Csharp :: exceeds your upload_max_filesize ini directive (limit is 2048 KiB). 
Csharp :: unity dotween sequence 
Csharp :: c# map function 
Csharp :: c# callback param 
Csharp :: get index brushes properties c# 
Csharp :: c# instance class with ilogger 
Csharp :: how to query items with any id in a list of ids linq c# 
Csharp :: winform fixed size 
Csharp :: c# Case insensitive Contains(string) 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =