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

Tài liệu Chapter 2 Quick Reference docx

1 255 0

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 1
Dung lượng 6,66 KB

Nội dung

Chapter 2 Quick Reference To Do this 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++; . Chapter 2 Quick Reference To Do this Declare a variable Write the name of the data. example: outcome = 42; Convert a string to an int Call the System.Int 32. Parse method. For example: System.Int 32. Parse(" 42& quot;); Override precedence

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

w