반응형 C#61 [C#] Contract, Code Contracts(코드 계약) Contract 클래스 Contract 클래스 (System.Diagnostics.Contracts) 사전 조건, 사후 조건, 개체 고정 조건 같은 프로그램 계약을 나타내는 정적 메서드가 포함됩니다. learn.microsoft.com namespace System.Diagnostics.Contracts { public static class Contract { // 계약 위반 이벤트 public static event EventHandler ContractFailed; // 전제 조건 [Conditional("CONTRACTS_FULL")] public static void Requires(bool condition); [Conditional("CONTRACTS_FULL")] public static .. 2023. 10. 20. [C#] Debug, Trace Debug 클래스 Debug 클래스 (System.Diagnostics) 코드 디버깅에 도움이 되는 메서드 및 속성들을 제공합니다. learn.microsoft.com namespace System.Diagnostics { public static class Debug { public static int IndentSize { get; set; } public static bool AutoFlush { get; set; } public static TraceListenerCollection Listeners { get; } public static int IndentLevel { get; set; } public static void Close(); public static void Flush(); pu.. 2023. 10. 18. [C#] WeakReference WeakReference 클래스 WeakReference 클래스 (System) 가비지 수집에 의한 개체 회수를 허용하면서 개체를 참조하는 약한 참조를 나타냅니다. learn.microsoft.com namespace System { public class WeakReference : ISerializable { public WeakReference(object target); public WeakReference(object target, bool trackResurrection); protected WeakReference(SerializationInfo info, StreamingContext context); ~WeakReference(); public virtual bool IsAlive { g.. 2023. 10. 14. [C#] GC, GCSettings, 쓰레기 수거(Garbege Collection) GC 클래스 GC 클래스 (System) 사용하지 않는 메모리를 자동적으로 회수하는 서비스인 시스템 가비지 수집기를 제어합니다. learn.microsoft.com namespace System { public static class GC { public static int MaxGeneration { get; } public static int CollectionCount(int generation); public static int GetGeneration(object obj); public static int GetGeneration(WeakReference wo); public static long GetTotalMemory(bool forceFullCollection); public static.. 2023. 10. 12. 이전 1 2 3 4 5 6 7 ··· 16 다음 반응형