using Microsoft.VisualBasic;
using
System; using
System.Collections;
using
System.Collections.Generic;
using
System.Data;
using
System.Diagnostics;
partial
class _Default : System.Web.UI.Page
{
public class one
{
public int i;
public int j;
public int k;
public int @add(int i)
{
//function with one
argument
return i;
}
public int @add(int i, int j)
{
//function with two
arguments
return i + j;
}
public int @add(int i, int j, int
k)
{
//function with three
arguments
return i + j + k;
}
}
protected void Page_Load(object sender,
System.EventArgs e)
{
one two = new one();
Response.Write(two.@add(10));
//calls the function with one
argument
Response.Write(two.@add(10, 20));
//calls the function with two
arguments
Response.Write(two.@add(10, 20,
30));
//calls the function with three
arguments
}
public _Default()
{
Load += Page_Load;
}
}
|