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
What is a statement c#?
how to print invert pyramid in c#
What is default method in c#?
What are the steps to make an assembly to public?
What does string intern do?
What are native functions?
Explain About friend and Protected friend
What are the boolean data types in c#?
Which programming language is best for desktop applications?
What are the advantages of generics in c#?
What is definition in c#?
What is a race condition?
Distinguish between system.string and system.text.stringbuilder classes?
Is arraylist thread safe?
What do you mean by for each loop?