ContentSerializerAttribute.Optional Property
Indicates whether to write this element if the member is null and skip past it if not found when deserializing XML (default=false).
Namespace: Microsoft.Xna.Framework.Content
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public bool Optional { get; set; }
Property Value
true if the member should be skipped when null.
Example
ContentSerializerAttribute with Optional set true.
[ContentSerializerAttribute( Optional = true )]
See Also
Reference
ContentSerializerAttribute Class
ContentSerializerAttribute Members
Microsoft.Xna.Framework.Content Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista