⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exceptioneventargs.cs

📁 Gibphone is CSharp Program, it can tell you how to design p2p chat.
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;

namespace GPCore
{
    /// <summary>
    /// An EventArgs that contains an Exception for error handling.
    /// </summary>
    public class ExceptionEventArgs : EventArgs
    {
        private Exception e;
        /// <summary>
        /// The Exception.
        /// </summary>
        public Exception Exception
        {
            get { return e; }
        }
        /// <summary>
        /// Create a new <see cref="ExceptionEventArgs"/>.
        /// </summary>
        /// <param name="e">The Exception to be passed.</param>
        public ExceptionEventArgs(Exception e)
        {
            this.e = e;
        }
    }

    /// <summary>
    /// An Exception to be thrown for an invalid password.
    /// </summary>
    [global::System.Serializable]
    public class InvalidPasswordException : ArgumentException
    {
        /// <summary>
        /// Creates a new <see cref="InvalidPasswordException"/>.
        /// </summary>
        /// <param name="username">The username that tried to log in.</param>
        /// <param name="password">The password that was invalid.</param>
        public InvalidPasswordException(string username, string password) : base(username, password) { }
        /// <summary>
        /// Creates a new <see cref="InvalidPasswordException"/>.
        /// </summary>
        /// <param name="username">The username that tried to log in</param>
        /// <param name="password">The password that was invalid</param>
        /// <param name="inner">Any inner exceptions that were the cause of this failure.</param>
        public InvalidPasswordException(string username, string password, Exception inner) : base(username, password, inner) { }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -