tailieunhanh - The Mcts self paced training kit exam 70-536 microsoft net framework 3.5 application development foundation - part 10

Đúng Trả lời: C A. không đúng: Bạn nên để nắm bắt điều khoản cụ thể để chung nhất. B. không đúng: Loại thứ nhất phù hợp là bị bắt và điều khoản bắt sau đó được bỏ qua. C. đúng: Loại thứ nhất phù hợp là bị bắt, và các điều khoản bắt sau đó được bỏ qua. Do đó, bạn đặt hàng nên bắt điều khoản cụ thể để chung nhất để cho phép bạn để bắt lỗi | 706 Answers 2. Correct Answer C A. Incorrect You should order catch clauses from most specific to most general. B. Incorrect The first type that matches is caught and subsequent catch clauses are skipped. C. Correct The first type that matches is caught and subsequent catch clauses are skipped. Therefore you should order catch clauses from most specific to most general to enable you to catch errors that you have specific error-handling for while still catching other exceptions with the more general catch clauses. D. Incorrect The first type that matches is caught and subsequent catch clauses are skipped. 3. Correct Answer A A. Correct Using the String type to construct a dynamic string can result in a lot of temporary strings in memory because the String type is immutable. Therefore using the StringBuilder class is preferable. B. Incorrect Strings are limited to 32 767 bytes not 256 bytes. C. Incorrect You can search and replace with a standard String class. D. Incorrect Strings are never value types they are reference types. 4. Correct Answer B A. Incorrect Although this statement is true the real advantage of using a finally block is that code is executed even if the runtime does not throw an exception. Code in a catch block is executed only if an exception occurs. B. Correct Use finally blocks for code that should run whether or not an exception occurs. C. Incorrect The compiler will not throw an error if you do not include a finally block. finally blocks are optional. D. Incorrect You can dispose of resources in a catch block. However the code will run only if an exception occurs. Typically you need to dispose of resources whether or not an exception occurs. 5. Correct Answer B A. Incorrect The property provides a description of the exception but it does not specify the line of code that caused the exception. Answers 707 B. Correct The property provides a full dump of the call stack at the time the exception was thrown .

TỪ KHÓA LIÊN QUAN