Jader Dias Jader Dias - 1 year ago 132
C# Question

How to make Visual Studio to automatically include curly brackets in C# code?

After

namespace
,
class
,
struct
,
enum
,
for
,
foreach
,
while
,
switch
,
do
,
using
,
unchecked
and at the beginning of methods, shouldn't Visual Studio automatically include curly brackets? How to activate this feature?

Answer Source

One option is to use Code Snippets. Visual Studio already comes with snippets for namespace, enum, for, foreach, while, switch, do, using, and unchecked. For instructions on how to use snippets go here.

If you can think of a snippet that makes sense for your class and struct you can create your own snippet.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download