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 difference between sleep () and wait ()?
What is dbml file in c#?
What is a ienumerator?
What is difference between singleordefault and firstordefault?
What is querystring in c#?
What is class sortedlist underneath?
What are constructors in c#?
How is a string immutable?
Are objects passed by reference in c#?
Hello! How to do this: "Create manifest utility intended for creating update content files. Application should take a set of files as input parameter and generate XML based manifest file as output one." I use C# and vs.net 2003. It's urgent! Help please, thanks. Mayana
What is this keyword in C#?
What is thread life cycle in c#?
Which function is the entry point for a DLL in MS Windows 3.1?
Explain async and await?
What is primitive types in c#?