Method hiding in C sharp Arabic #21


Method hiding in C sharp Arabic #21

In this session 021
❑ Method hiding. 
❑ Invoke hidden base class members.

Inheritance Concepts.

Use the new keyword to hide a base class member. You will get a compiler warning if you miss the new keyword.

Different ways to invoke a hidden a base class member from derived class

1. Use base keyword 
2. Cast child type to parent type and invoke the hidden member 
3. ParentClass PC=new childClass() PC.HiddenMethod()

Follow Us

YouTube

 If you want to download pptx : click Telegram

Facebook

Twitter

Instagram

Tik Tok

إرسال تعليق

أحدث أقدم