I
ichor
hi i created an example to demonstrate the use of delegates
DoubleOp []op= {new DoubleOp(MathOp.MultiplyBytwo),
new DoubleOp(MathOp.Square)};
for (int i =0 ; i<op.Length ; i++)
{
MessageBox.Show ("using operation " + i );
double result = op(10); //here i want to see the value of op how do
i do that?
MessageBox.Show (result.ToString());
}
when i type this in command window it gives me the foll
op[1].ToString()
"delegates.Form1+DoubleOp"
but i want to see MathOp.Square or MathOp.MultiplyByTwo
how do i do that?
thanx
DoubleOp []op= {new DoubleOp(MathOp.MultiplyBytwo),
new DoubleOp(MathOp.Square)};
for (int i =0 ; i<op.Length ; i++)
{
MessageBox.Show ("using operation " + i );
double result = op(10); //here i want to see the value of op how do
i do that?
MessageBox.Show (result.ToString());
}
when i type this in command window it gives me the foll
op[1].ToString()
"delegates.Form1+DoubleOp"
but i want to see MathOp.Square or MathOp.MultiplyByTwo
how do i do that?
thanx