Error.Argument Method (String, Object[])
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Creates an ArgumentException with the provided properties and logs it with Error.
Namespace: System.Web.Http.Common
Assembly: System.Web.Http.Common (in System.Web.Http.Common.dll)
Syntax
'Declaration
Public Shared Function Argument ( _
messageFormat As String, _
ParamArray messageArgs As Object() _
) As ArgumentException
public static ArgumentException Argument(
string messageFormat,
params Object[] messageArgs
)
public:
static ArgumentException^ Argument(
String^ messageFormat,
... array<Object^>^ messageArgs
)
static member Argument :
messageFormat:string *
messageArgs:Object[] -> ArgumentException
public static function Argument(
messageFormat : String,
... messageArgs : Object[]
) : ArgumentException
Parameters
- messageFormat
Type: System.String
A composite format string explaining the reason for the exception.
- messageArgs
Type: System.Object[]
An object array that contains zero or more objects to format.
Return Value
Type: System.ArgumentException
The logged Exception.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.