2010-02-12 9 views

답변

5

제네릭이라고합니다. 다음은 그 중 몇 가지 사용 방법은 다음과 같습니다 this MSDN의 소개 페이지 그리고 더 많은 정보를 원하시면에서

public virtual void SetupGrid<T, T2>() 
    where T : class, new() 
    where T2 : class, new() 

시작.

+1

가장 빠른 컴파일러 :) – David

2

당신은 제네릭 형식 인수에 대해 얘기하고,없는 익명의 클래스 형

예이 가능하다 :이 같은

public virtual void SetupGrid<T,T2>() 
    where T : class, new() 
    where T2: class, new() 
{ 

} 
1

: 서구

 public virtual void SetupGrid<T, T2>() where T : class, new() where T2 : class, new() { 
관련 문제