Debug.Fail : Debug « System.Diagnostics « C# / C Sharp by API






Debug.Fail

  
using System;
using System.Collections;
using System.Diagnostics;

class Class1 {
   static void Main(string[] args) {
     Debug.Fail("Fail Message", "An unexpected exception has been thrown.\n\n");
   }
}

   
    
  








Related examples in the same category

1.Debug.Assert
2.Debug.Listeners
3.Debug.WriteLine