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


当前回答

这是我最喜欢的评论。

/// I intend to do this as shittily as possible because there are many better products that will totally blow this out of the water
/// and we don't have them so whatever

在后面的文件中,我们有更多的乐趣

/// sidestep a bug in WCF (that we can't send types across)
/// or, depending on how you look at, this issue is a Feature

稍后再讲

if( where == null)//be nice

其他回答

Repeat
    ...
Until (JesusChristsReturn) ' Not sure

不是真的评论:

DvLog::Log("This silly log message fixes a PSCRIPT5.DLL gpf when printing to Adobe.");

可悲的是,没有评论,PSCRIPT5.DLL真的炸了…

在一个名为“Bar”的类中(这是一个不具有描述性名称的UI控件),类头文件:

/// <summary>I pity the "foo".</summary>

Remove()方法:

/// <summary>A "foo" and his money are soon parted.</summary>

更糟糕的是,业务合作伙伴从生成的文档中指出了这一点。更糟糕的是,这些可能是我们从那家伙那里得到的最接近有用文件的东西。

# To understand recursion, see the bottom of this file 

在文件的底部:

# To understand recursion, see the top of this file
//When I wrote this, only God and I understood what I was doing
//Now, God only knows