ParameterBindingExtensions.BindAsError Method
Binds parameter that results as an error.
Namespace: System.Web.Http.Controllers
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function BindAsError ( _
parameter As HttpParameterDescriptor, _
message As String _
) As HttpParameterBinding
'Usage
Dim parameter As HttpParameterDescriptor
Dim message As String
Dim returnValue As HttpParameterBinding
returnValue = parameter.BindAsError(message)
public static HttpParameterBinding BindAsError(
this HttpParameterDescriptor parameter,
string message
)
[ExtensionAttribute]
public:
static HttpParameterBinding^ BindAsError(
HttpParameterDescriptor^ parameter,
String^ message
)
static member BindAsError :
parameter:HttpParameterDescriptor *
message:string -> HttpParameterBinding
public static function BindAsError(
parameter : HttpParameterDescriptor,
message : String
) : HttpParameterBinding
Parameters
parameter
Type: System.Web.Http.Controllers.HttpParameterDescriptorThe parameter descriptor that describes the parameter to bind.
message
Type: System.StringThe error message that describes the reason for fail bind.
Return Value
Type: System.Web.Http.Controllers.HttpParameterBinding
The HTTP parameter binding object.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HttpParameterDescriptor. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).