下面是一個例子,也懶得看它只是注意到的東西有多大可以得到:Visual Studio的XML註釋
/// <summary>
/// An animated sprite is stored as one image, visually divided in
/// matrix-like form where each frame is one element. Frames are numbered
/// from 0 to some number n. The top left frame in the matrix is at (0, 0)
/// and the bottom right is at (n, n). Given a frame number this method
/// returns a position in that matrix.
/// </summary>
/// <param name="frame">Frame number.</param>
/// <returns>Matrix position.</returns>
/// <remarks></remarks>
/// <seealso cref="Book: C# Game Programming for Serious Game Creation."/>
public System.Drawing.Point GetMatrixPositionFromFrameNumber(int frame)
{
System.Drawing.Point point = new System.Drawing.Point();
point.Y = frame/framesX;
point.X = frame - (point.Y * framesX);
return point;
}
你這樣的傢伙發表評論或者你以某種方式獲取評論你的源文件?
謝謝
心不是這個適合programmers.stackexchange.com ..其NT問題PerSay的 – Baz1nga
難道你們連註釋一行的方法呢? – pokoko222
當談到評論時,我非常肛門,所以我評論除字段以外的所有內容。公共API是非常重要的,但是對於私有方法,當其他人維護代碼時它很有用。 –