Windows; or redirect the input stream to a source, such as a text file, that has an actual end-of-file character.The ReadLine method, or the KeyAvailable property and ReadKey method are preferable to using the Read method.ExamplesThe following code example demonstrates the Read method.