다음을 통해 공유


<example>(Visual C++)

<example> 태그를 사용하면 메서드나 기타 라이브러리 멤버의 사용 방법에 대한 예제를 지정할 수 있습니다.일반적으로이 사용 하는 작업도 하는 <code> 태그.

<example>description</example>

매개 변수

  • description
    코드 예제에 대한 설명입니다.

설명

/doc로 컴파일하여 문서 주석을 파일로 저장합니다.

예제

// xml_example_tag.cpp
// compile with: /clr /doc /LD
// post-build command: xdcmake xml_example_tag.dll

/// Text for class MyClass.
public ref class MyClass {
public:
   /// <summary>
   /// GetZero method
   /// </summary>
   /// <example> This sample shows how to call the GetZero method.
   /// <code>
   /// int main() 
   /// {
   ///    return GetZero();
   /// }
   /// </code>
   /// </example>
   static int GetZero() {
      return 0;
   }
};

참고 항목

기타 리소스

XML 문서(Visual C++)