What does new() mean?

后端 未结 3 765

There is an AuthenticationBase class in WCF RIA Services. The class definition is as follows:

// assume using System.ServiceModel.DomainServices         


        
3条回答
  •  情深已故
    2020-12-01 21:53

    It's the new constraint.

    It specifies that T must not be abstract and must expose a public parameterless constructor in order to be used as a generic type argument for the AuthenticationBase class.

提交回复
热议问题