S_pot
C#_인터페이스: 다중상속 본문
class Program
{
class Parent { }
class Child : Parent, IDisposable, IComparable // 한개의 클래스와 두 개의 인터페이스를 상속받습니다.
{
public int CompareTo(object obj) // IComparable 인터페이스 구현
{
throw new NotImplementedException();
}
public void Dispose() // IDispose 인터페이스 구현
{
throw new NotImplementedException();
}
}
static void Main(string[] args)
{
}
}
'C#' 카테고리의 다른 글
C#_delegate: 메서드를 변수로 사용하는 개념 (0) | 2021.06.14 |
---|---|
C#_인터페이스의 장점: 기능을 빠트리지 않고 입력 (0) | 2021.06.04 |
C#_인터페이스: 인터페이스를 사용하는 이유(다중상속) (0) | 2021.06.04 |
C#_인터페이스 생성 (0) | 2021.06.04 |
C#_iComparable인터페이스: 비교정렬 (0) | 2021.06.04 |