课程: Learning C#
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Writing C# comments
- [Narrator] I'm a big believer in commenting code, to make it easier to understand and work on in the future. After you have it looked at it in a while or if someone else is going to be reading your code. The C sharp language provides a few different ways of commenting your code. And we're going to take a moment in this example to see how they work. So here in our folder, for the start in the comments folder, let's open up the program file. So there's a few different ways you can comment your code. Single line comments, are written with two forward slashes at the beginning of the line. And I can write, for example, single line comments start with two slashes, and you can have as many of these as you want. So single line comments are usually good for simple comments throughout a source file. And usually you'll see one, to maybe three or four of these together. If you find yourself writing comments that span more than a few…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。