C# where keyword
Posted
by Carra
on Stack Overflow
See other posts from Stack Overflow
or by Carra
Published on 2010-05-05T14:23:51Z
Indexed on
2010/05/05
14:28 UTC
Read the original article
Hit count: 294
c#
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?
© Stack Overflow or respective owner