Programming Tutorials

(追記) (追記ここまで)

Comments in C#

By: Ram Baskar in Csharp Tutorials on 2011年02月05日 [フレーム]

C# utilizes a double forward slash (//) to indicate the rest of the line is a comment. This is inherited from C++.

public class Foo
{
 // a comment
 public static void Bar(int firstParam) {} //Also a comment
}
Multi-line comments can be indicated by a starting forward slash/asterisk (/*) and ending asterisk/forward slash (*/). This is inherited from standard C.
public class Foo
{
 /* A Multi-Line
 comment */
 public static void Bar(int firstParam) {} 
}



(追記) (追記ここまで)


Add Comment

JavaScript must be enabled for certain features to work
* Required information
1000

Comments

No comments yet. Be the first!
(追記) (追記ここまで)
(追記) (追記ここまで)

AltStyle によって変換されたページ (->オリジナル) /