VB.net
Other
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
|
|
attachedProperty
Go to top |
Purpose
Public Shared ReadOnly $propertyName$Property As System.Windows.DependencyProperty = System.Windows.DependencyProperty.RegisterAttached("$propertyName$", GetType ($propertyType$), GetType ($containingType$), new System.Windows.PropertyMetadata(Nothing))
Public Shared Function Get$propertyName$ (ByVal $element$ As $UIElement$) As $propertyType$
Return DirectCast ($element$.GetValue ($propertyName$Property), $propertyType$)
End Function
Public Shared Sub Set$propertyName$ (ByVal $element$ As $UIElement$, ByVal value As $propertyType$)
$element$.SetValue ($propertyName$Property, value)
End Sub
Before expansion
Parameters
|
|
ByRef
Go to top |
Purpose
ByRef $PARAM_NAME$ As $PARAM_TYPE$
Before expansion
Parameters
|
|
ByVal
Go to top |
Purpose
ByVal $PARAM_NAME$ As $PARAM_TYPE$
Before expansion
Parameters
|
|
ct
Go to top |
Purpose
CType($EXPR$, $TYPE$)
Before expansion
Parameters
|
|
dc
Go to top |
Purpose
DirectCast($EXPR$, $TYPE$)
Before expansion
Parameters
For more details on
CType vs. DirectCast
see
Visual Basic Language Reference: DirectCast |
|
dependencyProperty
Go to top |
Purpose
Public Shared ReadOnly $propertyName$Property As System.Windows.DependencyProperty = System.Windows.DependencyProperty.Register("$propertyName$", GetType ($propertyType$), GetType ($containingType$), new System.Windows.PropertyMetadata(Nothing))
Public Property $propertyName$ As $propertyType$
Get
Return DirectCast (GetValue($propertyName$Property), $propertyType$)
End Get
Set
SetValue($propertyName$Property, value)
End Set
End Property
Before expansion
Parameters
|
|
dim
Go to top |
Purpose
Dim $VAR$ As $TYPE$
Before expansion
Parameters
|
|
fun
Go to top |
Purpose
Function $NAME$() As $TYPE$
$END$
End Function
Before expansion
Parameters
|
|
out
Go to top |
Purpose
System.Console.WriteLine("$END$")
Before expansion
Parameters
|
|
outv
Go to top |
Purpose
System.Console.WriteLine("$EXPR$ = {0}", $EXPR$)
Before expansion
Parameters
|
|
pssm
Go to top |
Purpose
Public Shared Sub Main
$END$
End Sub
Before expansion
Parameters
|
|
sel
Go to top |
Purpose
Select Case $expression$
$END$
End Select
Before expansion
Parameters
|
|
sfc
Go to top |
Purpose
Dim $VAR$ As $TYPE$ = TryCast($EXPR$, $TYPE$)
If $VAR$ IsNot Nothing Then
$END$
End If
Before expansion
Parameters
|
|
sub
Go to top |
Purpose
Sub $NAME$
$END$
End Sub
Before expansion
Parameters
|
|
tc
Go to top |
Purpose
TryCast($EXPR$, $TYPE$)
Before expansion
Parameters
|




and

