When I first learned C #, I felt that the language was so simple that I didn't have to spend time on it. But when I really started my first software, I feel that he hasn't understood many aspects yet. I think I should write down what I understand, share it with you, and record my progress.
Most operations on the file system are encapsulated in the system. Io namespace. Use the Directory class and file class to manage file directories and file operations, such as copying, cutting, deleting, and creating file directories and files; directoryinfo and fileinfo are corresponding instance operations. If you want to reuse an object multiple times, you can use directoryinfo,FileinfoInstead of directory, the corresponding static method of the file class. An important part of file operations is the reading and writing of files, which are implemented through "streams. Stream is the abstract base class of all streams. filestream and memorystream publish file-based streams, which support both synchronous read/write operations and asynchronous read/write operations. textreader and textwriter are streamreader, streamwriter, stringreader, and stringwriter abstract base classes. streamreader, streamwriter, stringreader, and stringwriter can read and write upper-layer files. It is worth mentioning that network operations can also be seen as operations on a file system in a broad sense. In the next article, I will summarize the relationships between classes used in network programming, I hope it will be helpful to you, and I hope you will correct the mistakes.