나는이 사이트의 스레드 중 하나만 읽고 있었고 나는 그 것을 잘 이해할 수없는 비정상적인 클래스 정의를 보았습니다. 누군가이 정의가 무엇을 의미하는지 설명해 주시겠습니까?일부 C# 코드 이해하기
public class Node<T> where T : class
{
public Node<T> Next { get; set; }
public T Value { get; set; }
public Node(T value)
{
Next = null;
Value = value;
}
}
특히 그것은 T 클래스 (참조 형식)이어야 제약과 제네릭 매개 변수 T와 일반 클래스 정의의
public class Node<T> where T : class
[일반 형식 제약] (http://msdn.microsoft.com/en-us/library/d5x73970.aspx) – ChaosPandion
가능한 중복 [C# where where] (http : // stackoverflow.com/questions/2774041/c-where-keyword) – ChaosPandion