TryParse(TResult) Method
Tries to parse the input without getting an exception.
Namespace: System.Spatial
Assembly: System.Spatial (in System.Spatial.dll)
Syntax
'Declaration
Public Function TryParse(Of TResult As {Class, ISpatial}) ( _
input As TParseParameter, _
<OutAttribute> ByRef result As TResult, _
<OutAttribute> ByRef errorMessage As String _
) As Boolean
'Usage
Dim instance As SpatialFormat
Dim input As TParseParameter
Dim result As TResult
Dim errorMessage As String
Dim returnValue As Boolean
returnValue = instance.TryParse(input, _
result, errorMessage)
public bool TryParse<TResult>(
TParseParameter input,
out TResult result,
out string errorMessage
)
where TResult : class, ISpatial
public:
generic<typename TResult>
where TResult : ref class, ISpatial
bool TryParse(
TParseParameter input,
[OutAttribute] TResult% result,
[OutAttribute] String^% errorMessage
)
member TryParse :
input:'TParseParameter *
result:'TResult byref *
errorMessage:string byref -> bool when 'TResult : not struct and ISpatial
JScript does not support generic types and methods.
Type Parameters
- TResult
The type of object to produce.
Parameters
- input
Type: TParseParameter
The input to be parsed.
- result
Type: TResult%
If the return is true, this will have the object that was produced.
- errorMessage
Type: System..::..String%
If the return is false, this will contain the error message.
Return Value
Type: System..::..Boolean
True if the parse was successful, and false otherwise.
See Also
Reference
SpatialFormat< (Of < ( <'TParseParameter, TFormatReturn, TWriterTarget> ) > ) > Class