tailieunhanh - Visual studio 2010 part 15
Một mục để thu hút sự chú ý của bạn vào trong Ví dụ 5-2 là các chỉ thị bằng cách sử dụng (Nhập khẩu trong VB), quy định cụ thể mà bạn có thể sử dụng các loại trong không gian tên ClassLibraryDemo mà không đủ đủ điều kiện cho họ. Sau đó, bạn có thể xem như thế nào Ví dụ 5-2 tạo ra các trường hợp sinh viên và myStudent và các cuộc gọi GetStudentGrade | Chapter 5 Creating and Building Projects 129 For Each grade In grades - grade Next End Sub End Module One item to draw your attention to in Listing 5-2 is the using directive Imports in VB specifying that you can use the types in the ClassLibraryDemo namespace without fully qualifying them. After that you can see how Listing 5-2 creates instances of Student and myStudent and calls GetStudentGrades. TIP The call to in Listing 5-2 causes program execution to stop until the user presses a key on their keyboard. If was not present the program would finish the Main method which would close the application before you had the chance to see the output. Next you ll want to compile the code to see if the syntax is good and then run the program to see if it operates properly. The next section explains how compiling and running works with VS. Compiling Applications You ll find several compilation options on the Build menu. Because there are so many options it isn t always intuitive which option you should use. The options are scoped to either the current project or the entire solution. The top portion of the menu applies to the entire solution and the second section is context-sensitive applying to the currently selected project. The following sections describe each set of options including build rebuild and clean for both projects and solutions. Building Solutions Projects Building typically means that you run the compiler to compile source code files. Sometimes the build includes more than compilation. For example if you are writing applications VS will generate code based on the Web controls on the page and then that generated code will be compiled with normal code. Therefore the term build is more accurate than compile. During a normal build VS will only build the items in a project or solution that are out of date. More specifically only projects that have changes and edits will be rebuilt 130 .
đang nạp các trang xem trước