PropertyConverter 类


包含用于在属性值和字符串之间进行转换的帮助器函数。Contains helper functions to convert property values to and from strings.

此 API 支持产品基础结构,不能在代码中直接使用。

public ref class PropertyConverter abstract sealed
public static class PropertyConverter
type PropertyConverter = class
Public Class PropertyConverter


PropertyConverter类由 ASP.NET 页框架使用, 不应在代码中直接访问。The PropertyConverter class is used by the ASP.NET page framework and is not intended to be accessed directly from your code. 您可以使用Enum结构将字符串值与枚举器相互转换, 或TypeConverter转换为对象。You can use the Enum structure to convert string values to and from enumerators, or TypeConverter to convert objects.


EnumFromString(Type, String)

将字符串表示形式转换为指定枚举类型的值。Converts the string representation to a value of the specified enumeration type.

EnumToString(Type, Object)

将指定枚举类型的值转换为其等效的字符串表示形式。Converts the value of the specified enumeration type to its equivalent string representation.

ObjectFromString(Type, MemberInfo, String)

将字符串值转换为指定的对象类型。Converts the string value to the specified object type.