§LinemyLine = (Line)myObject;
§‘as’操作符-Line myLine = myObjectasLine; -
§如果失败,没有异常,但对象为null !
§‘is’操作符–if (myObj is Line) …
§typeof操作符 – if typeof (obj1) == typeof(obj2)…
§GetType - If obj1.GetType() == obj2.GetType() …