tailieunhanh - Visual Basic .NET The Complete Reference phần 9

Các mã sau đây, mà thoát khỏi phát hiện nếu Option Explicit được thiết lập để Off, do đó sẽ không làm việc trừ khi nó được xây dựng và khởi tạo. Để khắc phục nó, bạn cần phải khai báo các mảng với các yếu tố (nhớ, tên và các dấu ngoặc là chỉ là một biến tham chiếu đến các đối tượng mảng | The File Class Move Moves the source file to a new folder. It also provides the option of a new filename Open Opens a FileStream on the given path OpenRead Opens an existing file for reading OpenText Opens an existing UTF-8 encoded text file for reading OpenWrite Opens an existing file for writing SetAttributes Sets the specified FileAttributes on the file on the given path SetCreationTime Sets the date and time that the file was created SetLastAccessTime Sets the date and time that the given file was last accessed SetLastWriteTime Sets the date and time that the given file was last written to The other stickler in file and directory operations is having to deal with the differences between the various file systems on the Windows platformFAT FAT32 and the mighty NTFS. The current file system on the platform you are targeting your application to determines the exact format of a path. You might not always have the pleasure of working with one file system or even accessing a file or directory on a system other than a version of FAT or NTFS. You thus need to come up with a flexible design to accommodate changing file system conditions. Some paths start with drive or volume letters while others do not. Some file systems maintain file extensions and some do not. Some systems maintain a three-character extension others let you maintain extensions of more than three characters. The separator characters of path namespaces also differ from platform to platform. And you probably know that various TCP IP path elements are separated with forward slashes instead of the backslashes of the UNC. Paths can also contain absolute or relative location information. Absolute paths specify physical locations that can be uniquely identified. Relative paths specify a partial location that still requires additional resolution. File systems on the various platforms in use today are as different as humming birds are from fruit beetles. To cater to these differences remember we are living in .

TỪ KHÓA LIÊN QUAN