【发布时间】:2011-02-23 22:06:28
【问题描述】:
为什么这样做:
// If parameter cannot be cast to Point return false.
TwoDPoint p = obj as TwoDPoint;
if ((System.Object)p == null)
{
return false;
}
而不是这个:
// If parameter cannot be cast to Point return false.
TwoDPoint p = obj as TwoDPoint;
if (p == null)
{
return false;
}
我不明白你为什么要写 ((System.Object)p)?
问候,
丹
【问题讨论】:
-
我在等他说这就是他的老师说的那样做或其他什么:)
-
厄尔兹,没有。我正在仔细检查。
-
这很有趣,为什么他们会在 MSDN 上给出这样的例子?