Debug.Assert
using System; using System.Diagnostics; using System.Collections; using System.Data; using System.Text; public class MainClass{ public static void Main(){ Debug.Assert(1 == 0,"Error!","Error: 1 == 0"); } }