Re: implementing Assert
From: Robert Jordan (robertj_at_gmx.net)
Date: 10/15/04
- Next message: Joep: "Re: Console Application"
- Previous message: Rakesh Rajan: "RE: SQL INSERT syntax error, but the statement is correct!"
- In reply to: Zeng: "implementing Assert"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 15 Oct 2004 20:14:08 +0200
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:
Did you considered System.Diagnostics.Debug.Assert?
bye
Rob
>
> 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!!
>
>
- Next message: Joep: "Re: Console Application"
- Previous message: Rakesh Rajan: "RE: SQL INSERT syntax error, but the statement is correct!"
- In reply to: Zeng: "implementing Assert"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|