If two continuous slashes preceeds the comment
if ( line [ 0 ] == ' / ' && line [ 1 ] == ' / ' && line [ 2 ] != ' / ' ) { Console . WriteLine ( " It ▁ is ▁ a ▁ single - line ▁ comment " ) ; return ; } if ( line [ line . Length - 2 ] == ' * ' && line [ line . Length - 1 ] == ' / ' && line [ 0 ] == ' / ' && line [ 1 ] == ' * ' ) { Console . WriteLine ( " It ▁ is ▁ a ▁ multi - line ▁ comment " ) ; return ; } Console . WriteLine ( " It ▁ is ▁ not ▁ a ▁ comment " ) ; }