Tuesday, October 9, 2007

Output Parameters using C#

Definition:

if you want to return more than one value from method, You have to use out put parameters.

Example:
Public void site(out string site)
{
Site="bala";
}

public void showord()
{
string site;
site(out site);
Response.write("The site of the day is "+site);
}

Out put:

The site of the day is bala