C# notes part ->6
File Implementing file IO concepts: Stream: A stream is a sequence of bytes traveling from source to destination over a communication path. The streams are 1. Input stream 2. Output stream Input stream is used for read operation. Output stream is used for write operation. In order to perform operations like file creation, file deletion, read, write operations to a file, we require System.IO namespace. System.IO | | FileReader StreamReader StreamWriter BinaryWriter DirectoryInfo FileInfo If data of a file is only text then we can use StreamReader and StreamWriter classes to perform reading and writing. StreamReader class | Close() Peck() Read() ReadLine() Seek() FILE STREAM: To open an existing file or to create a new file, we require an object of type FileStream Syntax: FileStream obj = new FileStream(“filename”,FileMode enumerator,FileAccess enumerator,FileShare enumerator); Write a program to read data from the existing file using System; using Syst