i know in java and other nice languages it's possible to comment out a bunch of lines at the same time. is it possible to do this in vb.net?
views:
191answers:
5
+10
A:
If you mean syntactically, like /* ... */
in C++, then no. But if you mean from your IDE, then from Visual Studio:
- Highlight the text you want to comment out
- Type Ctrl+K, then Ctrl+C
- You can also uncomment text using Ctrl+K, then Ctrl+U
Dan Tao
2009-12-15 18:36:53
+4
A:
Yup. Select the text and then press Ctrl-K, Ctrl-C. And you can uncomment it using Ctrl-K, Ctrl-U.
Corin
2009-12-15 18:37:32
+1
A:
You can use conditional compilation to achieve the same effect:
#If False Then
Dim parameters() As SqlParameter = _
{ _
New SqlParameter("@program_year", programYear), _
New SqlParameter("@report_id", reportId), _
New SqlParameter("@report_group", reportGroup), _
New SqlParameter("@report_period", reportPeriod) _
}
Return SqlHelper.ExecuteDataSet(Report.ConnectionString, kSql, parameters, CommandType.StoredProcedure)
#End If
Dewayne Christensen
2009-12-15 18:43:35