Click here to Skip to main content
15,887,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I am facing one issue can you give me suggestions.


Question:
Suppose we have a class

C#
Class A
{
 string Fun1(){//some logic return String};
 Int Fun2(){//some logic return int };
 objClassXyz Fun3(//some logic return object of class ClassXyz);
}


Now I will inherit this Class A in n number of classes

C#
Class B:A
{
base.Fun1();
}
Class C:A
{
base.Fun2();
}
Class D:A
{
base.Fun1();
base.Fun3();
}


My question is : Can i do something in my class A using property,Indexes or other C# functionality so that there will be no need to wright base.Fun1(),base.Fun2() etc every time?i.e. want to use a single statement that will call desired function and desired return type?

[edit]Code block added - OriginalGriff[/edit]
Posted
Updated 21-Nov-12 0:37am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900