if we use virtual keyword in base class but not using override keyword in derived class what will happen?

Recommended Answers

All 2 Replies

Nothing would happen. but for more clarification what will happen when?!
An example what would happen if you didn't override ToString method?! Nothing it'd return the name of the class.

When you call the method you will get the implementation defined in the parent class carried out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.