Error.InvalidOperation 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 InvalidOperationException 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 InvalidOperation ( _
messageFormat As String, _
ParamArray messageArgs As Object() _
) As InvalidOperationException
public static InvalidOperationException InvalidOperation(
string messageFormat,
params Object[] messageArgs
)
public:
static InvalidOperationException^ InvalidOperation(
String^ messageFormat,
... array<Object^>^ messageArgs
)
static member InvalidOperation :
messageFormat:string *
messageArgs:Object[] -> InvalidOperationException
public static function InvalidOperation(
messageFormat : String,
... messageArgs : Object[]
) : InvalidOperationException
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.InvalidOperationException
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.