다음을 통해 공유


XmlTypeAttribute.IncludeInSchema 속성

정의

XML 스키마 문서에 형식을 포함할지 여부를 나타내는 값을 가져오거나 설정합니다.

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

속성 값

trueXML 스키마 문서에 형식을 포함하려면 그렇지 않으면 . false

예제

다음 예제에서는 클래스에 XmlTypeAttribute 적용하여 ExtraneousInfo 속성을 false.로 설정합니다IncludeInSchema.

[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

설명

클래스에 XmlTypeAttribute 적용하여 XML 형식의 네임스페이스, XML 형식 이름 및 XML 스키마 문서에 형식을 포함할지 여부를 지정합니다. 클래스의 XmlTypeAttribute 속성을 설정하는 결과를 보려면 애플리케이션을 실행 파일 또는 DLL로 컴파일하고 결과 파일을 XML 스키마 정의 도구(XSD.exe)에 전달합니다. 도구는 형식 정의를 포함하여 스키마를 씁니다.

적용 대상