1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Chapter 2 Quick Reference docx

1 255 0
Tài liệu được quét OCR, nội dung có thể không chính xác
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Chapter 2 Quick Reference
Chuyên ngành C# Programming
Thể loại Quick reference
Định dạng
Số trang 1
Dung lượng 6,66 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Chapter 2 Quick Reference Declare a variable Write the name of the data type, followed by the name of the variable, followed by a semicolon.. For example: int outcome; Change the value o

Trang 1

Chapter 2 Quick Reference

Declare a variable

Write the name of the data type, followed by the name of the variable, followed by a semicolon For example:

int outcome;

Change the value

of a variable

Write the name of the variable on the left, followed by the assignment operator, followed by the expression calculating the new value,

followed by a semicolon For example:

outcome = 42;

Convert a string

to an int

Call the System.Int32.Parse method For example:

System.Int32.Parse("42");

Override

precedence

Use parentheses in the expression to force operands to bind to specific operators For example:

(3 + 4) * 5 Increment or

decrement a

variable

Use the ++ or <;$MI><;$MI> operator For example:

count++;

Ngày đăng: 21/01/2014, 15:20

w