virtual properties

前端 未结 7 1430
迷失自我
迷失自我 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:37

    You can have methods (often), properties, indexers or events, the virtual keyword has the same meaning : modifying the meaning (override) of the base class item. With properties, you can change the get/set accessors.

提交回复
热议问题