tailieunhanh - Developing Visual Studio .NET Macros and Add-Ins phần 4

Khi bạn mở hộp thoại Options thông qua Công cụ ➪ Options, theo thể loại Môi trường, các tùy chọn chung cho phép bạn lựa chọn giữa các tài liệu theo thẻ và môi trường MDI. (Hãy nhận biết rằng nếu bạn thay đổi thiết lập này, bạn sẽ phải khởi động lại Visual Studio NET trước khi bạn sẽ thấy những thay đổi.) | 98 Chapter 5 namespace. This namespace contains classes for accessing databases. namespace. This namespace includes types relating to graphics. Classes include Bitmap Brush Color Font Icon Image Point a structure that holds simply X and Y values Rectangle a structure that holds X Y Width and Height values and Size a structure that holds Width and Height values . Because the Point Rectangle and Size structures are quite useful classes in other namespaces occasionally use these structures in their member functions. If you call any of these member functions you need to include a reference to the namespace. namespace. This namespace handles file input and output. It includes many useful classes for various types of file I O such as a general-purpose File class as well as an extremely handy Directory class for manipulating directories something ANSI C is lacking and a Path class for manipulating path names stored as strings the Path class only manipulates strings it doesn t actually perform any file input or output . Other useful classes include MemoryStream StreamWriter for writing text to a file and StreamReader for reading text from a file . Note that if you work with the classes in the namespace you ll probably notice two classes called TextWriter and TextReader. These two classes are actually abstract classes that serve as a base for StreamWriter and StreamReader respectively along with several other classes. If you open the online help for either TextWriter or TextReader you can see a list of the derived classes. Also if you want to open a StreamReader or StreamWriter instance use the File class s OpenText method or CreateText method respectively. namespace. It s hard to imagine a macro that would need access to the Internet but this namespace is here for that purpose filled with several Net-related classes. Of course the namespace is useful in .NET programs other than macros that need access