Show / Hide Table of Contents

    Class ArgumentException

    The exception that is thrown when one of the arguments provided to a method is not valid.

    Inheritance
    Object
    Exception
    SystemException
    ArgumentException
    ArgumentNullException
    ArgumentOutOfRangeException
    Inherited Members
    Exception.HResult
    Exception.InnerException
    Exception.StackTrace
    Exception.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: System
    Assembly: mscorlib.dll
    Syntax
    public class ArgumentException : SystemException

    Constructors

    | Improve this Doc View Source

    ArgumentException()

    Initializes a new instance of the ArgumentException class.

    Declaration
    public ArgumentException()
    | Improve this Doc View Source

    ArgumentException(String)

    Initializes a new instance of the ArgumentException class with a specified error message.

    Declaration
    public ArgumentException(string message)
    Parameters
    Type Name Description
    String message

    The error message that explains the reason for the exception.

    | Improve this Doc View Source

    ArgumentException(String, Exception)

    Initializes a new instance of the ArgumentException class with a specified error message and a reference to the inner exception that is the cause of this exception.

    Declaration
    public ArgumentException(string message, Exception innerException)
    Parameters
    Type Name Description
    String message

    The error message that explains the reason for the exception.

    Exception innerException

    The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.

    | Improve this Doc View Source

    ArgumentException(String, String)

    Initializes a new instance of the ArgumentException class with a specified error message and the name of the parameter that causes this exception.

    Declaration
    public ArgumentException(string message, string paramName)
    Parameters
    Type Name Description
    String message

    The error message that explains the reason for the exception.

    String paramName

    The name of the parameter that caused the current exception.

    | Improve this Doc View Source

    ArgumentException(String, String, Exception)

    Initializes a new instance of the ArgumentException class with a specified error message, the parameter name, and a reference to the inner exception that is the cause of this exception.

    Declaration
    public ArgumentException(string message, string paramName, Exception innerException)
    Parameters
    Type Name Description
    String message

    The error message that explains the reason for the exception.

    String paramName

    The name of the parameter that caused the current exception.

    Exception innerException

    The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.

    Properties

    | Improve this Doc View Source

    Message

    Gets the error message and the parameter name, or only the error message if no parameter name is set.

    Declaration
    public override string Message { get; }
    Property Value
    Type Description
    String

    A text string describing the details of the exception.

    Overrides
    Exception.Message
    | Improve this Doc View Source

    ParamName

    Gets the name of the parameter that causes this exception.

    Declaration
    public virtual string ParamName { get; }
    Property Value
    Type Description
    String

    The parameter name.

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX