oops concepts overloading(C#)

oops concepts overloading(C#)

Definition:Same member different arguments.

public class over
{
public over()
{
}
public void getvalue(int id, int id1)
{
HttpContext.Current.Response.Write(id);
HttpContext.Current.Response.Write(id1);
}
public void getvalue(string id, string empname)
{
HttpContext.Current.Response.Write(id);
HttpContext.Current.Response.Write(empname);
}
}

out put

over getvalue1 = new over();
getvalue1.getvalue(”Pgmr”, “Pgmr1″); //This is for string
getvalue1.getvalue(1,2); //This is for integer

Leave a Reply


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.