C# where keyword
- by Carra
Our Indian overseas developers have written the following piece of code (C# 2.0):
public abstract class ObjectMapperBase<T> where T : new()
{
internal abstract bool UpdateObject(T plainObjectOrginal, T plainObjectNew, WebMethod fwm, IDbTransaction transaction);
}
Inheritor example:
public abstract class OracleObjectMapperBase<T> : ObjectMapperBase<T> where T : new()
{
internal override bool UpdateObject(T plainObjectOrginal,
T plainObjectNew,
WebMethod fwm,
IDbTransaction transaction)
{
//Fancy Reflection code
}
}
I've never seen the where keyword before after the class name. What does this do?