On 7/11/06, Craig Neuwirt <[EMAIL PROTECTED]> wrote:
> I agree.  However, even if we did that, how could Employee extend from
> both ActiveRecordBase<Empoyee> and Person

It wont.

class Person : ActiveRecordValidationBase<Person>

class Employee : Person
{

  public static Employee[] FindAll()
  {
    return (Employee[]) FindAll( typeof(Employee) );
  }
}

Another approach would be to get rid of T and instead using only
generic methods. For most cases the compiler will be able to infer the
generic argument.

Off the top of my head:

public static Array FindAll<Z>()
{
  return (Z[]) ActiveRecordBase.FindAll( typeof(Z) );
}

using as

public static Employee[] FindAll()
{
  return (Employee[]) FindAll<Employee>();
}

-- 
Cheers,
hammett
http://hammett.castleproject.org/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
CastleProject-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/castleproject-users

Reply via email to