次の方法で共有


FormatterServices.GetSerializableMembers メソッド (Type)

指定した Type のクラスのシリアル化できるすべてのメンバを取得します。

Overloads Public Shared Function GetSerializableMembers( _
   ByVal type As Type _) As MemberInfo()
[C#]
public static MemberInfo[] GetSerializableMembers(Typetype);
[C++]
public: static MemberInfo* GetSerializableMembers(Type* type) [];
[JScript]
public static function GetSerializableMembers(
   type : Type) : MemberInfo[];

パラメータ

  • type
    シリアル化されている型。

戻り値

非遷移的および非静的メンバの MemberInfo 型の配列。

例外

例外の種類 条件
ArgumentNullException type パラメータが null 参照 (Visual Basic では Nothing) です。
SecurityException 呼び出し元に、必要なアクセス許可がありません。

解説

通常、クラスのシリアル化できるメンバは、フィールドやプロパティなどの非遷移的および非静的メンバです。シリアル化できるメンバに含めるためには、プロパティに取得側と設定側の両方を設定する必要があります。 ISerializable インターフェイスを実装するクラス、またはシリアル化サロゲートを持っているクラスは、これらのメンバをすべてシリアル化する必要はありません。また、追加のメンバをシリアル化できます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

FormatterServices クラス | FormatterServices メンバ | System.Runtime.Serialization 名前空間 | FormatterServices.GetSerializableMembers オーバーロードの一覧 | XML シリアル化および SOAP シリアル化 | ISerializable | MemberInfo