When should we use abtract class and Interface Class?Give
an Example
Answer Posted / pallavi
Use an abstract class when you want to inherit only from the parent
Use an interface when you want to inherit from multiple sources
If the behaviour of base class is default behaviour of all the sub classes the use abstract. If it is not default behaviour for all the classes use interface.
Interface - CAN-DO relationship
abstract class - IS-A relationship
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is asp.net and how it works?
Define the term Scavenging in Caching?
Describe SOA and the tenets of it?
Why session is necessary in web application?
What is cross page posting? How is it done?
What is css and what is it used for?
What is the namespace to create thread in .net?
Hi this is the coding for adding data in to an xml table
i want the coding for update and delete
Try
Dim emp_xml_doc As New XmlDocument
If
System.IO.File.Exists(Server.MapPath("emp.xml")) Then
emp_xml_doc.Load(Server.MapPath("emp.xml"))
Dim myrow_element As XmlElement
myrow_element =
emp_xml_doc.CreateElement("EmpDetails")
Dim str As String
str = "
What is the maximum amount of memory any single process on windows can address?
What is session in web technology?
What is the full form of asp.net?
Explain what is the procedure to create the environment for asp.net? : asp.net mvc
What is loop in asp.net?
Is asp.net still used?
what are the Custom controls in asp.net?