public class Employee
{
public string EmpName{ get; set; }
public string EmpAddress { get; set; }
}
public class Welcome
{
public string WelcomeMethod(Employee emp)
{
return string.Format("Welcome {0} From {1}", emp.EmpName, emp.EmpAddress);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Employee obj = new Employee();
obj. EmpName = TextBox1.Text;
obj.EmpAddress = TextBox2.Text;
Welcome.WelcomeMethod(obj);
}
{
public string EmpName{ get; set; }
public string EmpAddress { get; set; }
}
public class Welcome
{
public string WelcomeMethod(Employee emp)
{
return string.Format("Welcome {0} From {1}", emp.EmpName, emp.EmpAddress);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Employee obj = new Employee();
obj. EmpName = TextBox1.Text;
obj.EmpAddress = TextBox2.Text;
Welcome.WelcomeMethod(obj);
}
No comments:
Post a Comment