1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
<Type Name="SerializableAttribute" FullName="System.SerializableAttribute">
<TypeSignature Maintainer="auto" Language="C#" Value="public sealed class SerializableAttribute : Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Enum | System.AttributeTargets.Delegate, Inherited=false, AllowMultiple=false)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Marks a type as being serializable.</summary>
<remarks>This attribute indicates that the class it's being applied to is serializable. This is a requirement for all classes in an object's graph that is being serialized. A <see cref="T:System.Runtime.Serialization.SerializationException" /> is thrown if a class without the <see cref="T:System.SerializableAttribute" /> is serialized.
<example><code lang="C#">
using System;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Soap;
public class SerializationDemo {
public static void Main() {
Point pt = new Point();
pt.x=1;
pt.y=2;
Console.WriteLine(pt);
SoapFormatter formatter = new SoapFormatter();
// Serialize out to STDOUT.
formatter.Serialize(System.Console.OpenStandardOutput(), pt);
}
}
[Serializable()]
public class Point {
public int x,y; // Serialize This
[NonSerialized()] // Don't serialize Visible attribute
public bool Visible=false;
public override string ToString(){ // Methods aren't serialized
return String.Format("({0},{1})",x,y);
}
}
</code></example></remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SerializableAttribute ();" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs>
<summary>Creates a new copy of the <see cref="T:System.SerializableAttribute" /> class.</summary>
<remarks />
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>
|