C# Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 1658 Page Views: 

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



Posted By: Avi Date: 15 October 2009 04:39:26 AM
 Answer:

After the name of derived class, place a colon and then the name of the base class.

For example:

class DerivedClass : BaseClass
{

}


Posted By: eTechPlanet


Date: 15 October 2009 04:39:26 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image 2LGF5t
Related Questions
C# : Write the syntax of calling an overloaded constructor within a constructor?

Write the syntax of calling an overloaded constructor within a constructor?

Syntax:- class sum1 { sum1(int count) { } } class sum0 : sum1 { sum0() : sum1(2) // calling bas....
Category: C# Date: 10/1/2010 11:34:31 AM
C# : Write the difference between TypeOf and GetType?

Write the difference between TypeOf and GetType?

Both of them produce the same information. The difference lies that from where the information is go....
Category: C# Date: 10/1/2010 11:33:31 AM
C# : What is Obsolete in C#? How can one make a method obsolete?

What is Obsolete in C#? How can one make a method obsolete?

Obsolete attributemarks the program entity as the one that is not recommended to be used further. Us....
Category: C# Date: 10/1/2010 11:32:31 AM
C# : How are strings compared in C#?

How are strings compared in C#?

Generally , whenever the strings are to be compared using "==" or "!=" operators....
Category: C# Date: 10/1/2010 11:31:31 AM
C# : I want to declare a variable naming checked, but it gives an error Why?

I want to declare a variable naming checked, but it gives an error Why?

This is because checked is a keyword in C# and keywords can't be used as a variable name.
Category: C# Date: 10/1/2010 11:30:31 AM