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


当前回答

catch (Exception ex)
{ 
    // just die already.
}

其他回答

//I'm sorry, but our princess is in another castle.
<!-- THIS IS THE MAIN CONFIGURATION FILE FOR THE ENTIRE BLOODY DIRECTORY    -->
<!--    WHATEVER YOU DO, DO NOT EDIT THIS FILE WITHOUT TALKING TO ME FIRST  -->
<!--                                I'M SERIOUS                             -->
<!-- (scroll down) -->
THIS PROGRAM HAS CODE THAT DOES NOT MEET STANDARDS      

这个评论几乎出现在我们这里的每一个节目中....

来自c#中的单元测试类:

#region quis custodiet ipsos custodes?

[Fact]
public void TestPositive()
{
    Assert.Equal(4, 2 + 2);
}

[Fact]
public void TestNegative()
{
    Assert.Equal(5, 2 + 2);
}

#endregion
'Do not optimize these next two lines. Compiler bugs lurk.

他们做到了。将变量压缩到第二行表达式中会导致跳到堆中间并尝试执行数据。