O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

SerializableAttribute

Synopsis

This attribute is used in the class definition to indicate that a class can be serialized. By default, all fields in the class are serialized except for the fields that are marked with a NonSerializedAttribute.

It is not necessary to use this attribute if a given type implements the System.Runtime.Serialization.ISerializable interface, which indicates that a class provides its own methods for serialization.

public sealed class SerializableAttribute : Attribute {
// Public Constructors
   public method SerializableAttribute();  
}

Hierarchy

ObjectAttributeSerializableAttribute

Valid On

Class, Struct, Enum, Delegate

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required