Generic Type Parameters

wwiki
이동: 둘러보기, 검색

https://docs.microsoft.com/ko-kr/dotnet/csharp/programming-guide/generics/generic-type-parameters

Type parameter naming guidelines[편집 | 원본 편집]

단일 문자 이름으로도 자체 설명이 가능하여 설명적인 이름을 굳이 사용할 필요가 없는 경우가 아니면 설명적인 이름을 지정해라.

public interface ISessionChannel<TSession> { /*...*/ }
public delegate TOutput Converter<TInput, TOutput>(TInput from);
public class List<T> { /*...*/ }

매개변수 이름안에 제약 조건을 나타내 보세요. 예를 들어 ISession으로 제한되는 매개변수의 이름은 TSession이 될 수 있다.