³
³ÂÏ£ÕÂ
Hi ,All
I have a simple class that contain few method, like this
public class TestClass{
public void A(){}
public void B(){}
}
I want to do something automatic before call the method ( for
example ,A() or B() etc)$B!#(BIs possible to do this through pass an
attribute or other something, except write the code like below:
public void A(){
DoSomethingFirst();
//continue to do method logic
}
public void B(){
DoSomethingFirst();
//continue to do method logic
}
I think the attribute maybe do this , or the event is the better
choice, but how can we handler the event when the Method(A() or B())
be invoked.
Any advise is welcome, thank you!
best regard,
Ares
I have a simple class that contain few method, like this
public class TestClass{
public void A(){}
public void B(){}
}
I want to do something automatic before call the method ( for
example ,A() or B() etc)$B!#(BIs possible to do this through pass an
attribute or other something, except write the code like below:
public void A(){
DoSomethingFirst();
//continue to do method logic
}
public void B(){
DoSomethingFirst();
//continue to do method logic
}
I think the attribute maybe do this , or the event is the better
choice, but how can we handler the event when the Method(A() or B())
be invoked.
Any advise is welcome, thank you!
best regard,
Ares