次の方法で共有


ConfigurationSectionGroup.ShouldSerializeSectionGroupInTargetVersion メソッド

定義

.NET Framework の指定したターゲット バージョンに対して構成オブジェクト階層をシリアル化するときに、現在の ConfigurationSectionGroup インスタンスをシリアル化するかどうかを示します。

protected public:
 virtual bool ShouldSerializeSectionGroupInTargetVersion(System::Runtime::Versioning::FrameworkName ^ targetFramework);
protected:
 virtual bool ShouldSerializeSectionGroupInTargetVersion(System::Runtime::Versioning::FrameworkName ^ targetFramework);
protected internal virtual bool ShouldSerializeSectionGroupInTargetVersion(System.Runtime.Versioning.FrameworkName targetFramework);
protected virtual bool ShouldSerializeSectionGroupInTargetVersion(System.Runtime.Versioning.FrameworkName targetFramework);
abstract member ShouldSerializeSectionGroupInTargetVersion : System.Runtime.Versioning.FrameworkName -> bool
override this.ShouldSerializeSectionGroupInTargetVersion : System.Runtime.Versioning.FrameworkName -> bool
Protected Friend Overridable Function ShouldSerializeSectionGroupInTargetVersion (targetFramework As FrameworkName) As Boolean
Protected Overridable Function ShouldSerializeSectionGroupInTargetVersion (targetFramework As FrameworkName) As Boolean

パラメーター

targetFramework
FrameworkName

.NET Framework のターゲット バージョン。

返品

true 現在のセクション グループをシリアル化する必要がある場合。それ以外の場合は false

注釈

.NET Framework 4 以降のバージョン用に作成された各構成セクション グループは、このメソッドを明示的にオーバーライドし、trueを返す必要がありますが、.NET Framework の指定されたバージョンに対してセクション グループが有効な場合に限ります。 .NET Framework の以前のバージョン用に作成された既存の構成セクション グループを変更する必要はありません。

基本型には、常に trueを返すこのメソッドの既定の実装が含まれています。 つまり、構成セクション グループの実装者がこのメソッドをオーバーライドしない場合、既定では、構成セクション グループはすべてのフレームワーク バージョンに対してシリアル化されます。

適用対象