-
[C#] Instance is TypeC#/기초 2024. 2. 2. 11:52
인스턴스 value가 어떤 타입(sub타입)인지 알고 싶을 때
public interface IContainerRegistry: ICustomContainer public interface IContainerProvider : ICustomContainer public class SimpleContainer : SimpleInjector.Container, IContainerRegistry, IContainerProvider ICustomContainer customContainer = new SimpleContainer; if (customContainer is SimpleContainer) // True
https://stackoverflow.com/questions/3561202/check-if-instance-is-of-a-type
728x90'C# > 기초' 카테고리의 다른 글
[C#] NameSpace Brace ; (0) 2024.02.26 [C#] get=> , get; (0) 2024.02.14 [C#] Time Check (1) 2024.01.24 [C#] Logger (0) 2024.01.23 [C#] Interface (0) 2024.01.16 댓글