반응형
Notice
Link
목록파이썬추상화 (1)
스택큐힙리스트
파이썬에서 인터페이스를 구현하는 방법은 무엇인가요?
public interface IInterface{ void show();} public class MyClass : IInterface{ #region IInterface Members public void show() { Console.WriteLine(Hello World!); } #endregion}이 C# 코드의 파이썬 동등 코드를 어떻게 구현하나요? class IInterface(object): def __init__(self): pass def show(self): raise Exception(NotImplementedException)class MyClass(IInterface): def __init__(self): IInterface.__init__(self) def show(self):..
카테고리 없음
2023. 4. 23. 01:05