PropertyConverter.ObjectFromString(Type, MemberInfo, String) 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 the string value to the specified object type.
This API supports the product infrastructure and is not intended to be used directly from your code.
public:
static System::Object ^ ObjectFromString(Type ^ objType, System::Reflection::MemberInfo ^ propertyInfo, System::String ^ value);
public static object ObjectFromString (Type objType, System.Reflection.MemberInfo propertyInfo, string value);
static member ObjectFromString : Type * System.Reflection.MemberInfo * string -> obj
Public Shared Function ObjectFromString (objType As Type, propertyInfo As MemberInfo, value As String) As Object
Parameters
- propertyInfo
- MemberInfo
The properties to use during conversion.
Returns
An object of type objType
.
Exceptions
An object of the type specified by objType
cannot be created from the value
parameter.
Remarks
The ObjectFromString method is used to convert a string value to an object.
Note
This member supports the .NET Framework infrastructure and is not intended to be used directly from your code. To convert a string value to an object, use the Parse
method for that object if the object provides a Parse
method. For example, an Int32 object can be created from a string through the Parse method.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기