Posted on March 28, 2009. Filed under: .NET, best practice, C#, programming | Tags: , , |

Checks for a condition and displays a message if the condition is false.
Assert(Boolean) Checks for a condition and outputs the call stack if the condition is false.

One advantage of Debug.Assert() is that the C# and VB compilers (not C++) eliminate the Debug.Assert() statement from the CIL code when the DEBUG precompile constant is not defined.

Dont use it in production / release code.

Read Full Post | Make a Comment ( None so far )


    My stuff about .NET, C#, ASP.NET, AJAX, Visual Studio, SQL Server, XML, Web Services, WCF, WPF, WF, CRM, etc.


    Subscribe Via RSS

    • Subscribe with Bloglines
    • Add your feed to Newsburst from CNET
    • Subscribe in Google Reader
    • Add to My Yahoo!
    • Subscribe in NewsGator Online
    • The latest comments to all posts in RSS


Liked it here?
Why not try sites on the blogroll...