What is the difference between File.ReadLines() and File.ReadAllLines()? [duplicate]

is there any performance difference related to these methods? YES there is a difference File.ReadAllLines() method reads the whole file at a time and returns the string[] array, so it takes time while working with large size of files and not recommended as user has to wait untill the whole array is returned. File.ReadLines() returns … Read more