The
delegate
has a
void
return type, so what exactly did you expect it to return?
If you want it to return the string you set the label to, change your delegate to:
delegate string j(object h);
And then do this:
string p1(object h)
{
return(label1.Text = string.Format("Step is :{0}", h.ToString()));
}
Oh, and please choose better variable names. It's not 1987 any more :-)