OOPS Interview question

Posted by Sivashankars under OOPS on 3/7/2015 | Points: 10 | Views : 3207 | Status : [Member] | Replies : 0
HI All,

Today I had attended a interview for skill set asp.net,c#,Sql

Interview Person asked a question as below

there is a class with two methods.
Public class employee
{
Public int Getsalary
{
//Code logic
}
public string GetEmployee
{
//Code Logic
}


}
Question is
any new client creating object for this class should not have access for getsalary method.
existing client creating object for this class should have access for both methods.

Please tell me how to achieve this.




Responses

(No response found.)

Login to post response