CSharpTest.Net
TryParse(String,Type,Object) Method
See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Utils Namespace > StringConverter Class > TryParse Method : TryParse(String,Type,Object) Method

input
The string value to convert
type
The type of the value to be converted to
value
The value once converted

Glossary Item Box

Converts the provided string to a value of TYPE if the type is registered, or raises ArgumentOutOfRangeException if no transform is registered for that type.

Syntax

Visual Basic (Declaration) 
Public Overloads Function TryParse( _
   ByVal input As String, _
   ByVal type As Type, _
   ByRef value As Object _
) As Boolean
C# 
public bool TryParse( 
   string input,
   Type type,
   out object value
)

Parameters

input
The string value to convert
type
The type of the value to be converted to
value
The value once converted

Return Value

True if it was able to make the conversion

Exceptions

ExceptionDescription
System.ArgumentOutOfRangeExceptionThe exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys