.Net Framework Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 1913 Page Views: 

What is the syntax to inherit from a class in C#?



Posted By: Avi Date: 28 August 2009 06:47:02 AM
 Answer:

Place a colon and then the name of the base class.
For Example:
class ChildClass : BaseClass
{

}


Posted By: eTechPlanet


Date: 28 August 2009 06:47:02 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image UpJ9dG
Related Questions
.Net Framework : What is Marshaling?

What is Marshaling?

Marshaling performs the necessary conversions in data formats between managed and unmanaged code. CL....
Category: .Net Framework Date: 8/28/2009 7:04:46 AM
.Net Framework : What is the top .Net class that everything is derived from?

What is the top .Net class that everything is derived from?

System.Object
Category: .Net Framework Date: 8/28/2009 7:01:44 AM
.Net Framework : Can we allow a class to be inherited, but prevent the method from being overridden?

Can we allow a class to be inherited, but prevent the method from being overridden?

Yes. Define the class as public and make the method sealed.
Category: .Net Framework Date: 8/28/2009 6:59:11 AM
.Net Framework : What is an interface class?

What is an interface class?

Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, inter....
Category: .Net Framework Date: 8/28/2009 6:56:01 AM
.Net Framework : What is an abstract class?

What is an abstract class?

A class that cannot be instantiated. An abstract class is a class that must be inherited and have th....
Category: .Net Framework Date: 8/28/2009 6:52:20 AM