Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# read last 10 lines of file

var nrOfPagesToRead = 10;
var lastLines = File.ReadLines(filePath).TakeLast(nrOfPagesToRead);
// careful because ReadLines(path) reads all the file in memory.
// Do not use this for large files.
Comment

PREVIOUS NEXT
Code Example
Csharp :: linq get a dictionary key and value c# 
Csharp :: Squares of a Sorted Array 
Csharp :: how to make a enter in C# string 
Csharp :: c# add object to array 
Csharp :: unity deactivate component 
Csharp :: 1 line if c# 
Csharp :: c# if statement 
Csharp :: unity find child by name 
Csharp :: C# loop through array of objet 
Csharp :: asp.net core mvc jsonresult example 
Csharp :: relaycommand 
Csharp :: checking if character is a digit or not in c# 
Csharp :: c# set cursor pos 
Csharp :: nunjucks index in loop 
Csharp :: c# increase length of array 
Csharp :: asp.net mvc image upload 
Csharp :: disable button in android studio 
Csharp :: xamarin picker 
Csharp :: unity notification 
Csharp :: wpf get function name 
Csharp :: c# csvhelper 
Csharp :: c# add time to datetime 
Csharp :: C# select keyword lambda 
Csharp :: create new .net core project visual studio 
Csharp :: multidimensional arrays c# 
Csharp :: deserialize json to dynamic object c# 
Csharp :: unity c# cos inverse 
Csharp :: how to find player gameobject in unity 
Csharp :: array declaration in c# 
Csharp :: append an array in c# 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =