你能进到这篇文章……

首先你可能明白类似于

double num=0;
int m=(int) num;
 

或者你明白 

int m=209;
string str=m.tostring();
或者说你甚至见过

char m=’c’;
int m=integer.parseint(m);
现在应该明白as了吧? 对, 你没有猜错,它就是一种类型强转的方式。例子如下:

object object=null;
string s = object as string;
if (s != null)
{
// object is a string.
}
 
———————
作者:行者-驰过
来源:csdn
转载:https://blog.csdn.net/qq_36684665/article/details/82121485