8.1 表达式的定义 - 图1什么是表达式:An expressions is a syntactic entity whose evaluation either produces a value or fails to terminate, in which case the expression is undefined.

evaluate a single value, object, method, or namespace

Single Value

  1. int x = 100;
  2. x++;
  3. ++x;

Object

  1. (new Form()).ShowDialog();

Method

  1. // Console.WriteLine 就是方法
  2. Action myActino = new Action(Console.WriteLine);

Namespace

  1. // System.Windows.Forms 名称空间访问表达式
  2. System.Windows.Forms.Form myForm = new Form();