你遇到过的源代码中最好的注释是什么?


当前回答

在大学的一次家庭作业中,一位老师特别坚决地要求我们注释代码:

//I wonder if she actually reads these.

当作业被返回时,在注释“是的,我愿意”旁边用红笔写着

其他回答

// THE LOOP THAT DO EVERYTHING!!!!!!!

在拉丁语中,从但丁的《神曲》中进入这里的人,请放弃希望。

为什么你不应该将你的软件开发外包的一个经典案例:

public class Contact
{
    //...    

    /// <summary>
    /// Gets or sets the name of the first.
    /// </summary>
    /// <value>The name of the first.</value>
    public string FirstName
    {
        get { return _firstName; }
        set { _firstName = value; }
    }
}
// A Gorgon class - For the love of Zeus don't look directly at it!

一个奇怪而恰当的有趣错别字:

断言(0);//永远不要在这一点上犯错