D
deepak
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
(e-mail address removed)
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
(e-mail address removed)