ReSharper 2016.2 Help

Predefined Surround Templates for ASP.NET (C#)

ReSharper | Templates Explorer | Surround Templates | ASP.NET(C#)

This topic lists all predefined surround templates for ASP.NET(C#) in ReSharper 2016.2. For more information about surround templates, see Surrounding Code Fragments with Templates

TemplateDetails
foreach

foreach block

Scope ASP.NET tags

Body

<% foreach ($TYPE$ $VARIABLE$ in $COLLECTION$) { %> $SELECTION$ $END$<%}%>

Parameters

  • COLLECTION - Suggests visible variable that can be enumerated (that is, used in foreach loop as collection) (enumerableVariable)
  • TYPE - Suggest type for a new variable declared in the template (suggestVariableType)
  • VARIABLE - When exectuted in variable declaration (where variable name should stand), suggests name for the variable. (suggestVariableName)
  • SELECTION - The text selected by the user before invoking the template.
  • END - The caret position after the template is applied.

Before expansion

Reference__Options__Templates__Surround_With_Templates__Predefined__ASP.NET__CSharp__foreach__before

After expansion
Reference__Options__Templates__Surround_With_Templates__Predefined__ASP.NET__CSharp__foreach__after

Last modified: 15 December 2016