TAILIEUCHUNG - C# language refference_2

uses a for statement to write out the integer values 1 through 10. The foreach statement A foreach statement enumerates the elements of a collection, executing a statement for each element of the collection. The example using System; using ; class Test { static void WriteList(ArrayList list) { foreach (object o in list) (o); } static void Main() { ArrayList list = new ArrayList(); for (int i = 0; i | Chapter 1 Introduction uses a for statement to write out the integer values 1 through 10. The foreach statement A foreach statement enumerates the elements of a collection executing a statement for each element of the collection. The example using System using class Test static void WriteList ArrayList list foreach object o in list o static void Main ArrayList list new ArrayList for int i 0 i 10 i i WriteList list uses a foreach statement to iterate over the elements of a list. The break statement and the continue statement A break statement exits the nearest enclosing switch while do for or foreach statement a continue starts a new iteration of the nearest enclosing while do for or foreach statement. The return statement A return statement returns control to the caller of the member in which the return statement appears. A return statement with no expression can be used only in a member that does not return a value . a method that returns void . A return statement with an expression can only be used only in a function member that returns an expression. The throw statement The throw statement throws an exception. The try statement The try statement provides a mechanism for catching exceptions that occur during execution of a block. The try statement furthermore provides the ability to specify a block of code that is always executed when control leaves the try statement. The checked and unchecked statements The checked and unchecked statements are used to control the overflow checking context for arithmetic operations and conversions involving integral types. The checked statement causes all expressions to be evaluated in a checked context and the unchecked statement causes all expressions to be evaluated in an unchecked context. Copyright Microsoft Corporation 1999-2000. All Rights Reserved. 15 C LANGUAGE REFERENCE The lock statement The lock statement obtains the .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.