1 out of 1 rated this helpful - Rate this topic

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.

Reference

C# Keywords

Concepts

C# Programming Guide

Other Resources

C# Reference

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ