컴파일러 오류 CS0082
업데이트: 2007년 11월
오류 메시지
'type' 형식에서 매개 변수 형식이 같은 'name' 멤버를 이미 예약했습니다.
Type 'type' already reserves a member called 'name' with the same parameter types
컴파일 타임에 속성은 식별자 앞에 get_ 및/또는 set_이 있는 메서드로 변환됩니다. 이 오류는 메서드 이름과 충돌하는 사용자 고유의 메서드를 정의하는 경우 발생합니다.
예제
다음 예제에서는 CS0082 오류가 발생하는 경우를 보여 줍니다.
//cs0082.cs
class MyClass
{
//property
public int MyProp
{
get //CS0082
{
return 1;
}
}
//conflicting Get
public int get_MyProp()
{
return 2;
}
public static int Main()
{
return 1;
}
}