How to Create object For Inner Class? or how to access inner class methods?

 Posted by Saranpselvam on 2/19/2013 | Category: OOPS Interview questions | Views: 4993 | Points: 40
Answer:

class A
{
public string DisplayName()
{

return "This is Class A";
}


public class B
{
public string DisplayName()
{

return "This is Class B";
}
}
}


-------------------------------------------------------

var obja=new A.B();
string txt = obja.DisplayName();
Response.Write(txt);


Asked In: HCL | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Saranpselvam