From the course: Transition from C# to Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Comments and DocStrings

Comments and DocStrings

From the course: Transition from C# to Python

Start my 1-month free trial

Comments and DocStrings

- [Instructor] Now that we've written some actual code and gone through the requisite HelloWorld program. Well, two HelloWorld programs in this case. Let's take a moment and examine another very important part of programming, and that's writing comments. Now I'm a big believer in the value of commenting your code to make it easier to read. So here in the comments folder, I'm going to open up comment underscore sample, and this is the C# version. And these comments probably look familiar to you, right? So single line comments are created with double slash characters and they only have one line. And multi-line comments start with a slash star and then end with a star slash, and can run over as many lines as you like. So doc net also supports the concept of XML documentation comments. Each line of an XML doc comment starts with a triple slash, and then contains XML tags that can be converted into readable documentation by an…

Contents