Exercises

  1. Create a new ASP.NET application using the same code as the I/O application to enable you to select directories and list their contents from the browser. An application like this could be used to list Web site contents and allow users to download files, or as an administration tool for listing files and directories and creating new file and directories.

  2. Look up the FileAttributes enumeration in the .NET Framework SDK. This enumeration gives the attributes of files on the operating system. Next, write a simple console application that uses the GetFiles method of the Directory class, and write the code that returns the attributes of the files in the root of your C drive. You can refer to Listing 9.5, where you used the GetFileSystemEntries ...

Get Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.