现在的位置: 首页 > 综合 > 正文

SerializationMode 枚举

2013年09月15日 ⁄ 综合 ⁄ 共 1316字 ⁄ 字号 评论关闭

SerializationMode 枚举

此内容为质量更高的人工翻译。若想同时查看此页面和原始英文页面的内容,请单击“首选项”然后选择“经典视图”作为您的查看首选项。

确定用于 ProfilePropertySettings 对象的序列化方法。

 

命名空间:  System.Web.Configuration
程序集:  System.Web(在 System.Web.dll 中)

语法


public enum SerializationMode
成员


  成员名称 说明
  String ProfilePropertySettings 对象序列化为简单字符串。
  Xml 配置文件 ProfilePropertySettings 使用 XML 序列化模式序列化为 XML。
  Binary ProfilePropertySettings 对象使用二进制序列化进行序列化。
  ProviderSpecific 提供程序具有类型的隐式信息,并负责决定如何将 ProfilePropertySettings 对象序列化到数据存储区中。
备注


ProfilePropertySettings 对象的 SerializeAs 属性控制单个配置文件属性设置的序列化模式。

示例


下面的代码示例演示如何使用 SerializeAs 属性。 此代码示例摘自一个为 ProfileSection 类提供的更大示例。

// Get the current SerializeAs property value.
Console.WriteLine(
    "Current SerializeAs value: '{0}'", profilePropertySettings.SerializeAs);

// Set the SerializeAs property to SerializationMode.Binary.
profilePropertySettings.SerializeAs = SerializationMode.Binary;


平台


Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

 

 

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息


.NET Framework

受以下版本支持:4、3.5、3.0、2.0

抱歉!评论已关闭.