Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

If I want to override a method one of class A and in class b then how do you declare?

Answer Posted / Supriya Gupta

To override a method from a base class (Class A) in a derived class (Class B), follow these steps:n1. Derive Class B from Class A using the ':' operator, e.g., 'public class B : A'n2. In Class B, declare the overriding method with the same signature as in Class A, but use the 'override' keyword before the return type.n3. Implement the overridden method.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which namespaces are necessary to create a localized application?

1128


How to assign Null value to Var?

1051


What is expression tree in c#?

990


How do you inherit a class into other class in c#?

978


Why can't we use a static class instead of singleton?

947


What is an abstract class c#?

954