ערוך

שתף באמצעות


XmlTypeAttribute.IncludeInSchema Property

Definition

Gets or sets a value that indicates whether to include the type in XML schema documents.

public:
 property bool IncludeInSchema { bool get(); void set(bool value); };
public bool IncludeInSchema { get; set; }
member this.IncludeInSchema : bool with get, set
Public Property IncludeInSchema As Boolean

Property Value

true to include the type in XML schema documents; otherwise, false.

Examples

The following example applies the XmlTypeAttribute to the ExtraneousInfo class, setting the IncludeInSchema property to false.


[XmlType(IncludeInSchema=false)]
public ref class ExtraneousInfo{};
[XmlType(IncludeInSchema = false)]
public class ExtraneousInfo
{
   // Insert the members of the class.
}
<XmlType(IncludeInSchema := False)> _
Public Class ExtraneousInfo
    ' Insert the members of the class.
End Class

Remarks

Apply the XmlTypeAttribute to a class to specify the XML type's namespace, the XML type name, and whether to include the type in the XML schema document. To see the results of setting the properties of the XmlTypeAttribute class, compile your application as an executable or DLL, and pass the resulting file to the XML Schema Definition tool (XSD.exe). The tool writes the schema, including the type definition.

Applies to