<summary> (دليل البرمجة لـ #C)
<summary>description</summary>
المعلمات
- description
خلاصة الكائن.
ملاحظات
يجب أن يتم استخدام علامة <summary> لوصف نوع أو عضو في نوع. استخدم <remarks> لإضافة معلومات إضافية لوصف نوع. استخدم سمة cref لتمكين أدوات الوثائق مثل Sandcastle من إنشاء ارتباطات تشعبية داخلية لصفحات الوثائق لعناصر التعليمات البرمجية.
نص علامة <summary> هو المصدر الوحيد للمعلومات حول النوع في IntelliSense كما يتم أيضاً عرضه في مستعرض الكائنات.
قم بالترجمة مع /doc لمعالجة تعليقات الوثائق للملف. لإنشاء الوثائق النهائية المستندة إلى ملف مُولد من برنامج التحويل البرمجي، يمكنك إنشاء أداة مخصصة أو استخدم أداة مثل Sandcastle.
مثال
// compile with: /doc:DocFileName.xml
/// text for class TestClass
public class TestClass
{
/// <summary>DoWork is a method in the TestClass class.
/// <para>Here's how you could make a second paragraph in a description. <see cref="System.Console.WriteLine(System.String)"/> for information about output statements.</para>
/// <seealso cref="TestClass.Main"/>
/// </summary>
public static void DoWork(int Int1)
{
}
/// text for Main
static void Main()
{
}
}
يظهر المثال التالي كيفية جعل cref تشير إلى نوع عام.
// compile with: /doc:DocFileName.xml
// the following cref shows how to specify the reference, such that,
// the compiler will resolve the reference
/// <summary cref="C{T}">
/// </summary>
class A { }
// the following cref shows another way to specify the reference,
// such that, the compiler will resolve the reference
// <summary cref="C < T >">
// the following cref shows how to hard-code the reference
/// <summary cref="T:C`1">
/// </summary>
class B { }
/// <summary cref="A">
/// </summary>
/// <typeparam name="T"></typeparam>
class C<T> { }
راجع أيضًا:
المرجع
العلامات المطلوبة لتعليقات الوثائق (دليل برمجة C#)