is operator
int myFunction (object obj)
{
if(obj is int){
int i = (int)obj;
//operate on the integer
}
else if(obj is string){
}
int myFunction (object obj)
{
if(obj is int){
int i = (int)obj;
//operate on the integer
}
else if(obj is string){
}
}
'컴퓨터 과학 & 영상처리 관련 > C# / .NET / JAVA' 카테고리의 다른 글
c# value types compared to reference types (0) | 2012.02.03 |
---|---|
c# properties (0) | 2012.02.03 |
c# access modifier (0) | 2012.02.03 |
c# char upper 사용법 (0) | 2012.02.02 |
c# namespace 줄여서 쓰기 (0) | 2012.01.09 |