ConfigurationSection.SerializeSection(ConfigurationElement, String, ConfigurationSaveMode) ConfigurationSection.SerializeSection(ConfigurationElement, String, ConfigurationSaveMode) ConfigurationSection.SerializeSection(ConfigurationElement, String, ConfigurationSaveMode) ConfigurationSection.SerializeSection(ConfigurationElement, String, ConfigurationSaveMode) Method

定義

建立 XML 字串,在該字串的單一區段中,包含了要寫入檔案之 ConfigurationSection 物件的取消合併檢視。Creates an XML string containing an unmerged view of the ConfigurationSection object as a single section to write to a file.

protected public:
 virtual System::String ^ SerializeSection(System::Configuration::ConfigurationElement ^ parentElement, System::String ^ name, System::Configuration::ConfigurationSaveMode saveMode);
protected internal virtual string SerializeSection (System.Configuration.ConfigurationElement parentElement, string name, System.Configuration.ConfigurationSaveMode saveMode);
abstract member SerializeSection : System.Configuration.ConfigurationElement * string * System.Configuration.ConfigurationSaveMode -> string
override this.SerializeSection : System.Configuration.ConfigurationElement * string * System.Configuration.ConfigurationSaveMode -> string
Protected Friend Overridable Function SerializeSection (parentElement As ConfigurationElement, name As String, saveMode As ConfigurationSaveMode) As String

參數

parentElement
ConfigurationElement ConfigurationElement ConfigurationElement ConfigurationElement

ConfigurationElement 執行個體,要用來做為執行取消合併時的父代。The ConfigurationElement instance to use as the parent when performing the un-merge.

name
String String String String

要建立的區段名稱。The name of the section to create.

saveMode
ConfigurationSaveMode ConfigurationSaveMode ConfigurationSaveMode ConfigurationSaveMode

要在寫入至字串時所使用的 ConfigurationSaveMode 執行個體。The ConfigurationSaveMode instance to use when writing to a string.

傳回

XML 字串,包含了 ConfigurationSection 物件的取消合併檢視。An XML string containing an unmerged view of the ConfigurationSection object.

備註

「序列化」是指將包含在物件中的即時資料轉換成 XML 格式,並將其儲存至設定檔。Serialization refers to the transformation of real-time data, contained in an object, to XML format and its storage to a configuration file.

適用於