c# return value throug params keyword
Hello ,
in below method - How to return value with params keyword.It is possible if change Do method return type to int.But I need to do it with void and params keyword.
Thanks in advance.
private void button1_Click(object sender, EventArgs e)
{
int x = 1;
Do(x);
MessageBox.Show(x.ToString());
}
public void Do(params object [] paramet )
{
int value = (int)paramet[0];
value = value + 2;
}