Hello, i just have a little design question.
If i got this code
public Interface Test
{
void Xyz();
}
public class1 : WebControl , Test
{
public void XyZ()
{
// do someting
}
public OnLoad()
{
((Test)this).Xyz();
// or
Test ctrl = this as Test;
ctrl.Xyz();
// or
Xyz();
}
}
Did the code will have a performance difference ? I think Xyz() direct call will be faster but i am not sure ((Test)this).Xyz() will have a difference with the direct call.
What are your opinion about that, or reference documentation.
Thanks
ps : I just whant have the difference performance, no answer with ... why you want to cast or specify the interface. I know i could just call directly my method