GetRelationInfo

Posts   
 
    
Posts: 134
Joined: 04-Mar-2005
# Posted on: 20-Sep-2005 19:18:53   

Is there a reason that GetRelationInfo isn't declared static/shared for TypedLists?

Drewes
User
Posts: 67
Joined: 18-Aug-2003
# Posted on: 21-Sep-2005 02:03:48   

The reason is that this way it allows you to overide it so you can add expression objects aggregates etc. to the fields.

Posts: 134
Joined: 04-Mar-2005
# Posted on: 21-Sep-2005 15:19:41   

Drewes wrote:

The reason is that this way it allows you to overide it so you can add expression objects aggregates etc. to the fields.

Can't I override a shared method just as easily?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 21-Sep-2005 15:44:35   

You cannot override a non-virtual or static method. The overridden base method must be virtual, abstract, or override

Please refer to the following link from the MSDN C# Programmer's Reference

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vclrfoverridepg.asp

Posts: 134
Joined: 04-Mar-2005
# Posted on: 21-Sep-2005 16:44:41   

I've heard you're supposed to learn something new every day. I guess today is one of those days. sunglasses

Thanks.