If I want to override a method one of class A and in class b then how do you declare?
Answer / Supriya Gupta
To override a method from a base class (Class A) in a derived class (Class B), follow these steps:
1. Derive Class B from Class A using the ':' operator, e.g., 'public class B : A'
2. In Class B, declare the overriding method with the same signature as in Class A, but use the 'override' keyword before the return type.
3. Implement the overridden method.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of system.environment class in c#.net?
What is the importance of closing an ado.net application?
What is event sourcing in c#?
what is main function of alternate teamplate of datalist?
Why dictionary is used in c#?
What is .net console?
How to exclude a property from xml serialization?
What does the dispose method do with the connection object?
what is read only and constant
What is thread safe in c#?
What do you use c# for?
Explain About Postback
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)