Tag: catch all

如何使用ThreadException?

我试过用 http://msdn.microsoft.com/en-us/library/system.windows.forms.application.threadexception.aspx#Y399 但是当我这样做的时候 throw new ArgumentNullException(“playlist is empty”); 我一无所获。 我打赌我错过了一些非常明显的东西。 这是我的代码。 using System; using System.Security.Permissions; using System.Windows.Forms; using System.Threading; namespace MediaPlayer.NET { internal static class Program { /// /// The main entry point for the application. /// [STAThread] [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)] private static void Main() { // Add the event handler for handling UI […]