Assertions

Assertions are new to Java version 1.4 and have no direct equivalent in C#. However, the .NET class libraries include a superset of the Java assert functionality through the static methods contained in both the System.Diagnostics.Debug and System.Diagnostics.Trace classes. A discussion of the Debug and Trace classes is beyond the scope of this book. Consult the Microsoft .NET documentation for more information.

Get C# for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.