rice クラス : GetComment(string) メソッド
説明
名前付きコメントを返します。
構文
riceInstance.GetComment(string commentName)
引数
クラス | 名前 | 説明 |
string | commentName | コメント名。 |
返り値
クラス | 説明 |
string | コメント本体。 |
サンプルコード
1: | /**Sample**concat**----------------------- |
2: | This is a |
3: | sample. |
4: | -----------------------------------------------*/ |
5: | rice rr; |
6: | string body = rr.GetComment("Sample"); // body is "This is a sample.". |
注意
コメント名が存在しない場合は UnknownException(KeyNotFoundException) をスローします。