C#
Other
- asrt
- asrtn
- attachedProperty
- dependencyProperty
- ear
- from
- hal
- join
- out
- outv
- pci
- pcs
- prop
- psr
- psvm
- rta
- sfc
- thr
- toar
- ua
This group contains non-categorized templates. Templates for creating arrays, declaring public variables and creating empty methods are provided here, among others.
| Template name | Description |
|---|---|
|
asrt
Go to top |
Purpose
System.Diagnostics.Debug.Assert($END$);
Before expansion
Parameters
|
|
asrtn
Go to top |
Purpose
System.Diagnostics.Debug.Assert($EXPR$ != null, "$MESSAGE$");
Before expansion
Parameters
|
|
attachedProperty
Go to top |
Purpose
public static readonly DependencyProperty $propertyName$Property =
DependencyProperty.RegisterAttached("$propertyName$", typeof ($propertyType$), typeof ($containingType$), new PropertyMetadata(default($propertyType$)));
public static void Set$propertyName$($UIElement$ $element$, $propertyType$ value)
{
$element$.SetValue($propertyName$Property, value);
}
public static $propertyType$ Get$propertyName$($UIElement$ $element$)
{
return ($propertyType$) $element$.GetValue($propertyName$Property);
}
Before expansion
Parameters
|
|
dependencyProperty
Go to top |
Purpose
public static readonly System.Windows.DependencyProperty $propertyName$Property =
System.Windows.DependencyProperty.Register("$propertyName$", typeof ($propertyType$), typeof ($containingType$), new PropertyMetadata(default($propertyType$)));
public $propertyType$ $propertyName$
{
get { return ($propertyType$) GetValue($propertyName$Property); }
set { SetValue($propertyName$Property, value); }
}
Before expansion
Parameters
|
|
ear
Go to top |
Purpose
$TYPE$[] $NAME$ = new $TYPE$[] {};
Before expansion
Parameters
|
|
from
Go to top |
Purpose
from $VAR$ in $COLLECTION$ $END$
Before expansion
Parameters
|
|
hal
Go to top |
Purpose
Html.ActionLink("$TEXT$", "$ACTION$", "$CONTROLLER$")
Before expansion
Parameters
|
|
join
Go to top |
Purpose
join $NAME$ in $COL$ on $EXPR1$ equals $EXPR2$ $END$
Before expansion
Parameters
|
|
out
Go to top |
Purpose
System.Console.Out.WriteLine("$END$");
Before expansion
Parameters
|
|
outv
Go to top |
Purpose
System.Console.Out.WriteLine("$EXPR$ = {0}", $EXPR$);
Before expansion
Parameters
|
|
pci
Go to top |
Purpose
public const int
Before expansion
|
|
pcs
Go to top |
Purpose
public const string
Before expansion
|
|
prop
Go to top |
Purpose
public $TYPE$ $NAME$ { get; set; }
Before expansion
Parameters
|
|
psr
Go to top |
Purpose
public static readonly
Before expansion
|
|
psvm
Go to top |
Purpose
public static void Main (string[] args)
{
$END$
}
Before expansion
Parameters
|
|
rta
Go to top |
Purpose
RedirectToAction("$ACTION$", "$CONTROLLER$")
Before expansion
Parameters
|
|
sfc
Go to top |
Purpose
$VARTYPE$ $VAR$ = $VAR1$ as $TYPE$;
if ($VAR$ != null)
{
$END$
}
Before expansion
Parameters
|
|
thr
Go to top |
Purpose
throw new
Before expansion
|
|
toar
Go to top |
Purpose
($TYPE$[])$ARRAYLIST$.ToArray(typeof($TYPE$))
Before expansion
Parameters
|
|
ua
Go to top |
Purpose
Url.Action("$ACTION$", "$CONTROLLER$")
Before expansion
Parameters
|
