tpyeof运算符用于获得某一类型的 System.Type 对象.tpyeof表达式采用以下形式:
typeof(type)
其中:
- type
- 要获得其 System.Type 对象的类型。
using system
class GettypeTest
{
public static void Main()
{
int radius=3;
Console.WriteLine("Area={0},radius*radius*Math.PI");
Console.WriteLine("The type is {0}",(radius*radius*Math.PI).GetType());
}
}
<iframe name="alimamaifrm" frameborder="0" marginheight="0" marginwidth="0" border="0" scrolling="no" width="300" height="170" src="/go/app/tbk_app/chongzhi_300_170.php?pid=mm_28854300_2441872_11377541&page=chongzhi_300_170.php&size_w=300&size_h=170&stru_phone=1&stru_game=1&stru_travel=1" ></iframe>