Members Declaration

Templates library includes multiple templates for quick member declaration. These templates are available when the caret is inside a class body, but outside methods and properties. Most member declaration templates are complex and consist of two parts — the kind of member and its type. The examples of member declaration templates are presented in the table below.

Member Kind void Boolean Integer Double String Object
Method m mb mi md ms mo
Property pb pi pd ps po
Auto-implemented Property ab ai ad as ao
Field fb fi fd fs fo

If you need to force the creation of a static member, Uppercase the first letter of the required template, for example, the "Ms" template will create the static method returning a string.

The following table lists the main System types you can use in templates by default. To access the full list of types or add a new one, refer to the Editor | All Languages | Template Name Variables options page.

Type Mnemonic
Boolean b
Byte by
Char c
DateTime d8
Decimal de
Double d
EventArgs ea
Exception x
Guid g
Int16 sh
Int32 i
Int64 l
IntPtr ip
Object o
Single si
String s
Type ty
UInt32 u

The full list of member declaration templates is available in the code templates configuration options.

See Also