From: deepak on
Can anybody reply to my 2nd question... Is this possible through
delegtes?...i am waiting for your answers....

"deepak" wrote:

> Actually Question 2 is not showed correctly which I am writing again to make
> it clear
>
> Class A{
>
> public Calc()
> {
> ////
> return 1;
> }
> }
>
> Class B: A{
>
> public Calc()
> {
> ////
> return 2;
> }
> }
>
> Class C: B{
>
> public Calc()
> {
> ////
> return 3;
> }
> }
>
> Class D: C{
>
> public Calc()
> {
> ////
> return 4;
> }
> }
>
>
>
> "deepak" wrote:
>
> > Hi,
> >
> > There are 2 Questions on C# Classes :->
> >
> > Quest 1. What will be result of below program.
> > Class A {
> > A()
> > {
> > B objB = new B();
> > }
> > }
> > class B {
> > B()
> > {
> > A objA = new A();
> > }
> > }
> >
> > }
> > static void Main(string[] args)
> > {
> >
> > A objA = new A();
> > B objB = new B();
> >
> >
> >
> > Quest 2. How can I call method written in Class B without creating instance
> > of
> > Class B i.e. without using B objB= new B();
> >
> > Class A{ Class B: A{ Class C: B{
> > Class D:C{
> > public Calc() public Calc() public Calc()
> > public Calc()
> > { { {
> > {
> > //// //// ////
> > ////
> > return 1; return 2; return 3;
> > return 4;
> > } } }
> > }
> > } } }
> > }
> >
> >
> > - Deepak
> > kr.deepak123(a)gmail.com