<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>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement>
  <Base>
    <BaseTypeName>System.Attribute</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes>
    <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>
    </Member>
  </Members>
</Type>
