Danh mục tài liệu

Chapter 2 Quick Reference

Số trang: 1      Loại file: pdf      Dung lượng: 6.66 KB      Lượt xem: 20      Lượt tải: 0    
Xem trước 1 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Chương 2 Quick tham khảo để làm này Ghi rõ tên của kiểu dữ liệu, theo sau là tên của biến, theo sau là một dấu chấm phẩy. Ví dụ: Khai báo một kết quả int biến; tên của biến Viết bên trái, tiếp theo là nhà điều hành chuyển nhượng,
Nội dung trích xuất từ tài liệu:
Chapter 2 Quick Reference Chapter 2 Quick ReferenceTo Do this Write the name of the data type, followed by the name of the variable, followed by a semicolon. For example:Declare a variable int outcome; Write the name of the variable on the left, followed by the assignment operator, followed by the expression calculating the new value,Change the value followed by a semicolon. For example:of a variable outcome = 42; Call the System.Int32.Parse method. For example:Convert a stringto an int System.Int32.Parse(42); Use parentheses in the expression to force operands to bind to specificOverride operators. For example:precedence (3 + 4) * 5Increment or Use the ++ or operator. For example:decrement avariable count++;