Could anyone help me with the line where TEntity : class, IEntity, new() in the following class declaration.
public abstract class BaseEntityManager<TEntity>
where TEntity : class, IEntity, new()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
where TEntity : ...applies constraints to the generic parameter TEntity. In this case, the constraints are:class: The argument to TEntity must be a reference type
IEntity: The argument must be or implement the IEntity interface
new(): The argument must have a public parameterless constructor
From http://msdn.microsoft.com/en-us/library/d5x73970.aspx