Cuemon .NET Framework
FromObject<TResult>(Object,TResult) Method

The type of the result.
The object to convert the underlying type.
The value to return if the conversion is not possible.
Attempts to converts the specified value to a given type. If the conversion is not possible the result is set to resultOnConversionNotPossible.
Syntax
'Declaration
 
Public Overloads Shared Function FromObject(Of TResult)( _
   ByVal value As Object, _
   ByVal resultOnConversionNotPossible As TResult _
) As TResult

Parameters

value
The object to convert the underlying type.
resultOnConversionNotPossible
The value to return if the conversion is not possible.

Type Parameters

TResult
The type of the result.

Return Value

The value converted to the specified TResult.
Remarks
This method first checks if value is compatible with TResult; if not compatible the method continues with ObjectConverter.ChangeType for the operation.
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