你也可以注释你代码以使ReSharper更好的分析你的代码。
You can also annotate your code to make ReSharper analyze it even better.
给大家举些例子,我们一直在强调什么来着?,我们讲过要用注释来说明,你在代码中进行的操作,以便于调试。
Give you some examples. What have we talked about? We've talked about things like using comments to highlight what you're doing in the code, to make it easier to debug.
譬如,如果你把这个XML摘要注释加到你的代码里去的话。
For example, if you added this XML summary comment to your code.
正如没有哪条规则告诉你代码里的注释一定要怎么写才正确,也不存在“正确”属性的一个普适的列表。
Just as there are no rules that tell you exactly what comments to write in your code, there is no universal list of the "right" attributes.
如果你使用汇编语言,那么你肯定会被要求写注释;在这个地球上还没有人能够直接读懂汇编代码。
If you write in assembly language, you're pretty much forced to write comments; no one on earth can read the code directly.
如果使用组合方法,你会发现:不需要太多的注释来描述方法的代码段(实际上函数方法要求有注释),而且你能更好地命名函数。
If you use composed method, you'll find much less need to have comments to delineate sections of code within methods (actual method calls do that), and you'll find that you use better method names.
否则,内联注释的出现表明你写的代码需要解释说明,意味着这些代码需要被重构。
Otherwise, the presence of inline comments indicates that you've written code that needs explanation, meaning that it cries out for refactoring.
唯一需要使用内联注释是在你编写了非常复杂的算法,你需要在代码旁边记录说明你的想法。
The only legitimate use of inline comments is when you have some very complex algorithm that you need to have some thoughts about beside the code.
详尽若是有些东西你搞不清楚,要么是代码写的就不够清楚,要么是注释不够,也可能二者兼有。
Be thorough. If you don't understand something, it's either not coded clearly enough or not commented thoroughly enough, or both.
我不会将这些文件的代码放在这片文章了,你可以下载代码并查看代码中的注释。
I won't put the file's code in the article, you can download it and read the comments in the code.
毫无疑问,你已经千百次地被告知,在编写代码时一定要添加注释。
I'm sure you have been told a number of times that you should write comments in your code.
注释是一些对你,或者对代码阅读者说的一些话,告诉你这段代码,是干什么的,对不对?
It's words to you, or to the reader of the code, that are telling you what's going on inside of this code. OK?
只有当内部注释有助于其他人理解你的代码时才添加。
Add internal comments only if they will aid others in understanding your code.
不要把代码注释里的to - do列表留下,尤其是你需要提交代码到客户端的时候。
Don't leave to-do lists within your code comments, especially if you're delivering code to the client.
c中,在我的版本中,我吧注释去掉了,但是在你们的版本中是有注释的,这是相当容易理解的,如果你通读这段代码。
C I've stripped out the comments in my version but in your version you do have comments for reference and it's actually pretty self-explanatory if you just read through the code.
如果你还能读懂1年前的代码,就算是你自己写的代码,这也说明了你放进去的注释,已经非常好了,对不对?
If you can read the code a year later, even code you wrote yourself, it's a good sign that you put good comments in, right?
如果你真的不需要它们的话,检查你所有的模板文件然后删除这些注释掉的代码和标签。
If you still don't want them, go through your template files and delete those commented out codes and tags.
如果效率很重要,我会用一些小技巧。这些技巧会误导读代码的人,你得加上注释,或者类似的东西标注一下,让它更可读。
If efficiency is important, I'll often resort to a trick. And then I realize that will mislead a human. And you have to comment it or do something to flag that, to make it more readable.
你写出的代码将更加整洁,有更好的注释,更好的程序结构——因为你知道,那个你很在意的人将会查看你的程序。
You'll write code that's neater, better documented, and better organized — because you'll know that people who's opinions you care about will be looking at your code.
当你熟悉它时,你的代码看起来好多了,没有不必要的注释代码块。
Whenyou are familiar with it, your code looks a lot nicer without unnecessary blockof commented code.
你的程序代码应该包括注释,解释更加复杂的零件。
Mark Your program code should include comments explaining the more complex parts.
代码没有注释,因为我认为你比我更聪明。
The code is without any comment, I think ur more clever than me.
读这行代码时就应当告诉你它的功能而无需注释。
Reading the line of code should tell you what it is doing without needing a comment.
强烈推荐你保留选项- C,就不会删除代码中的注释。
It's highly recommended that you keep the -c option for not deleting comments in your code.
通常来说,优秀的编码风格意味着,你要放进去的注释,在帮助代码阅读者,理解代码内部,是怎么工作的。
In general, good programming style says you put in comments that are going to be valuable in helping you as a reader understand what's going on inside of the code.
你可以用注释来解释你的代码,这样对你将来重新编辑这些代码会带来帮助。
You can use comments to explain your code, which can help you when you edit the source code at a later date.
你可以用注释来解释你的代码,这样对你将来重新编辑这些代码会带来帮助。
You can use comments to explain your code, which can help you when you edit the source code at a later date.
应用推荐