특이한 주석이 존재하네?
/// 일 경우에는 xml 주석인데 몇가지 태그가 존재한다.
어떤 의미로는.. doxygen 을 xml로 해놓은것 같긴한데...
결과물에 어떻게 나오는지 궁금하네?
// Adds two integers and returns the result
/// <summary>
/// Adds two integers and returns the result.
/// </summary>
/// <returns>
/// The sum of two integers.
/// </returns>
/// <example>
/// <code>
/// int c = Math.Add(4, 5);
/// if (c > 10)
/// {
/// Console.WriteLine(c);
/// }
/// </code>
/// </example>
public static int Add(int a, int b)
{
// If any parameter is equal to the max value of an integer
// and the other is greater than zero
if ((a == int.MaxValue && b > 0) || (b == int.MaxValue && a > 0))
throw new System.OverflowException();
return a + b;
}
[링크 : https://docs.microsoft.com/ko-kr/dotnet/csharp/codedoc]
[링크 : http://blog.daum.net/clerkurt/251]
댓글을 달아 주세요