Cuemon .NET Framework
TryFromString<T>(String,CultureInfo,T) Method

The type of the expected return value after conversion.
The string value to convert.
The culture-specific formatting information about value.
When this method returns, contains the equivalent to T of value, as specified by culture, or default(T) if an exception is thrown.
Converts the specified string to its T equivalent using the specified culture information.
Syntax
'Declaration
 
Public Overloads Shared Function TryFromString(Of T)( _
   ByVal value As String, _
   ByVal culture As CultureInfo, _
   ByRef result As T _
) As Boolean
public static bool TryFromString<T>( 
   string value,
   CultureInfo culture,
   out T result
)

Parameters

value
The string value to convert.
culture
The culture-specific formatting information about value.
result
When this method returns, contains the equivalent to T of value, as specified by culture, or default(T) if an exception is thrown.

Type Parameters

T
The type of the expected return value after conversion.

Return Value

true if the value parameter was successfully converted; otherwise false.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Converter Class
Converter Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback