Share via


TokenizerBackedParser<TTokenizer, TSymbol, TSymbolType>.Optional Method (TSymbolType)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Determines whether parsing a token with the given type is optional.

Namespace:  System.Web.Razor.Parser
Assembly:  System.Web.Razor (in System.Web.Razor.dll)

Syntax

'Declaration
Protected Friend Function Optional ( _
    type As TSymbolType _
) As Boolean
'Usage
Dim type As TSymbolType
Dim returnValue As Boolean 

returnValue = Me.Optional(type)
protected internal bool Optional(
    TSymbolType type
)
protected public:
bool Optional(
    TSymbolType type
)
member Optional : 
        type:'TSymbolType -> bool
function Optional(
    type : TSymbolType
) : boolean

Parameters

Return Value

Type: System.Boolean
true if parsing a token with the given type is optional; otherwise, false.

See Also

Reference

TokenizerBackedParser<TTokenizer, TSymbol, TSymbolType> Class

Optional Overload

System.Web.Razor.Parser Namespace