Export (0) Print
Expand All

Contextual Keywords (C# Reference)

A contextual keyword is used to provide a specific meaning in the code, but it is not a reserved word in C#. The following contextual keywords are introduced in this section:

get   Defines an accessor method for a property or an indexer.

partial   Defines partial classes, structs, and interfaces throughout the same compilation unit.

set   Defines an accessor method for a property or an indexer.

where   Adds constraints to a generic declaration.

yield   Used in an iterator block to return a value to the enumerator object or to signal the end of iteration.

value   Used to set accessors and to add or remove event handlers.

Community Additions

ADD
Show:
© 2014 Microsoft