virtual properties

前端 未结 7 1420
迷失自我
迷失自我 2020-12-14 00:00

I have used and learned only virtual methods of the base class without any knowledge of virtual properties used as

class A
{
   public virtual ICollection<         


        
相关标签:
7条回答
  • 2020-12-14 00:57

    Properties are a shortened form of accessor methods (Get & Set). That means that the virtual keyword has the same meaning as with any other method. That means you can override it in derived classes.

    0 讨论(0)
提交回复
热议问题