ApiController.Ok<T> Method (T)
Creates an OkNegotiatedContentResult<T> with the specified values.
Namespace: System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Protected Friend Overridable Function Ok(Of T) ( _
content As T _
) As OkNegotiatedContentResult(Of T)
'Usage
Dim content As T
Dim returnValue As OkNegotiatedContentResult(Of T)
returnValue = Me.Ok(content)
protected internal virtual OkNegotiatedContentResult<T> Ok<T>(
T content
)
protected public:
generic<typename T>
virtual OkNegotiatedContentResult<T>^ Ok(
T content
)
abstract Ok :
content:'T -> OkNegotiatedContentResult<'T>
override Ok :
content:'T -> OkNegotiatedContentResult<'T>
JScript does not support generic types and methods.
Type Parameters
- T
The type of content in the entity body.
Parameters
- content
Type: T
The content value to negotiate and format in the entity body.
Return Value
Type: System.Web.Http.Results.OkNegotiatedContentResult<T>
An OkNegotiatedContentResult<T> with the specified values.