로딩
요청 처리 중입니다...

C# 형변환 (as is)

 C# 형변환 (as is)

as : 형변환 할수 있는지 확인 후 할수 있으면 형변환 / 할수 없으면 null void start() { Person person = new Person(); Monster monster = new Monster(); //person = (person)monster; person = monster as Person; } is : 형변환 할수 있는지 확인후 true/false bool 값으로 반환 void start() { Person person = new Person(); Monster monster = new Monster(); if(monster is Person) { person = (Person)monster; } }...

C# 형변환 (as is)에 대한 요약내용입니다.

자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.

원문 링크 : C# 형변환 (as is)