Answer Posted / shivacharan
Reason1: In C# Multiple inheritence concept will be
implemented by Interfaces.
Reason2: When multiple ppl are working on one sigle
project, if they need to use some common functionality (for
example initializing the variables for thier modules)
instead of writing their own function name (like init,
initialize, setup etc etc) if we can write one single
function name (lets say initialize) then this function can
be implemented by any user who derives. That's it.
public interface IInitialize
{
void InitializeVar();
}
public classs Box:IInitialize
{
void InitializeVar()
{
//initializion of variables goes here
}
public classs Rectangle:IInitialize
{
void InitializeVar()
{
//initializion of variables goes here
}
this wil avoid all the confusion
Is This Answer Correct ? | 23 Yes | 1 No |
Post New Answer View All Answers
Differentiate between object pooling and connection pooling in c#?
What is the difference between ienumerable and iqueryable?
Describe an abstract class?
What is the difference between constant and readonly in c#?
How does return work in c#?
Can we write class inside a class in c#?
What is data binding with example?
Is it possible to inherit multiple interfaces?
Are arraylist faster or arrays?
What are fields in c#?
What is variable in c#?
Can I get the name of a type at runtime?
What is get set in c#?
What is session management in c#?
How do you use nullable?