FormatterConverter.Convert Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts a value to a given type.
Overloads
Convert(Object, Type) |
Converts a value to the given Type. |
Convert(Object, TypeCode) |
Converts a value to the given TypeCode. |
Convert(Object, Type)
- Source:
- FormatterConverter.cs
- Source:
- FormatterConverter.cs
- Source:
- FormatterConverter.cs
Converts a value to the given Type.
public:
virtual System::Object ^ Convert(System::Object ^ value, Type ^ type);
public object Convert (object value, Type type);
abstract member Convert : obj * Type -> obj
override this.Convert : obj * Type -> obj
Public Function Convert (value As Object, type As Type) As Object
Parameters
- value
- Object
The object to convert.
Returns
The converted value
or null
if the type
parameter is null
.
Implements
Exceptions
The value
parameter is null
.
Applies to
Convert(Object, TypeCode)
- Source:
- FormatterConverter.cs
- Source:
- FormatterConverter.cs
- Source:
- FormatterConverter.cs
Converts a value to the given TypeCode.
public:
virtual System::Object ^ Convert(System::Object ^ value, TypeCode typeCode);
public object Convert (object value, TypeCode typeCode);
abstract member Convert : obj * TypeCode -> obj
override this.Convert : obj * TypeCode -> obj
Public Function Convert (value As Object, typeCode As TypeCode) As Object
Parameters
- value
- Object
The object to convert.
Returns
The converted value
, or null
if the type
parameter is null
.
Implements
Exceptions
The value
parameter is null
.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應