Lecture overview -- Keyboard shortcut: 'u'  Previous page: Input and output -- Keyboard shortcut: 'p'  Next page: C# in relation to Java [Section] -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 17 : 43
Object-oriented Programming in C#
Introduction to C#
Comments

C# supports two different kinds of comments and XML variants of these

  • Single-line comments like in C++
    // This is a single-line comment

  • Delimited comments like in C
    /* This is a delimited comment */

  • XML single-line comments:
    /// <summary> This is a single-line XML comment </summary>

  • XML delimited comments:
    /** <summary> This is a delimited XML comment </summary> */

XML comments can only be given before declarations, not inside other fragments

Delimited comments cannot be nested