The class containing the function.
using System;
namespace singleton
{
///
/// Summary description for checkfuns.
///
public class checkfuns
{
public checkfuns()
{
//
// TODO: Add constructor logic here
//
}
public void addvalue(ref int a, out int b, out int g)
{
a=a+20;
b=a+10;
g=100;
//return;
}
}
}
The button click event where the function is invoked.
private void button1_Click(object sender, System.EventArgs e)
{
checkfuns chk1=new checkfuns();
int c=5;
int d,f;
chk1.addvalue(ref c,out d, out f);
MessageBox.Show(c.ToString() + "," + d.ToString()+ "," + f.ToString());
}