这是一个示例,不必费心阅读它,只需注意事物可以变得有多大:
/// <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;
}
你们会这样评论吗?或者你们是否以某种方式从源文件中获得评论?
谢谢
最佳答案
中国有句古话:“注释越接近代码越好”。
我对这个长度并不感到惊讶。
您稍后可以使用 sancaSTLe 等工具从源代码中提取此信息。
关于c# - Visual Studio XML 注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7190386/