Z
Zeng
Hi,
I'm wondering if there is a way to capture the line that call a method
within the invoked method. I need to implement an assert statement
checking. For example:
public class Tools
{
static public void Assert( bool bMustBeTrue )
{
if( !bMustBeTrue )
ErrorLog.Output( "This statement is not true:" + ????? ); //
how do I capture "State_X == CurrentState" ? );
}
}
invoking code:
Assert( State_X == CurrentState )
Thanks!!
I'm wondering if there is a way to capture the line that call a method
within the invoked method. I need to implement an assert statement
checking. For example:
public class Tools
{
static public void Assert( bool bMustBeTrue )
{
if( !bMustBeTrue )
ErrorLog.Output( "This statement is not true:" + ????? ); //
how do I capture "State_X == CurrentState" ? );
}
}
invoking code:
Assert( State_X == CurrentState )
Thanks!!