Привет, дорогой хабр! Далее я приведу 5 функций, которые мне, в своей работе приходится постоянно использовать.
1. Получение длины файла
public int getFileRowsCount(string pathToFile)
{
System.IO.TextReader streamReader = new System.IO.StreamReader(pathToFile);
int rowsCounter = 0;
while ((streamReader.ReadLine()) != null)
{
rowsCounter++;
}
streamReader.Close();
return rowsCounter;
}
