Definitions Flashcards
Define enumerator
An enumerator is a read-only, forward-only cursor over a sequence of values.
Define iterator
An iterator produces an enumerator, also, an iterator is a method, property, or indexer that contains one or more yield statements.
What is an extension method
An extension method is a static method of a static class, where the this modifier is applied to the first parameter.
Define Tuple
Tuples provide a simple way to store a set of values.
The main purpose of tuples is to safely return multiple values from a method without resorting to out parameters.
Example:
var bob = ("Bob", 23); or (string, int) bob = ("Bob", 23);
Define Attribute
Attributes are an extensible mechanism for adding custom information to code elements (assemblies, types, members, return values, parameters, and generic type parameters).
Define Binding
Binding is the process of solving types, members, and operations–at either compile time or runtime.
Explain the difference between Formatting and Parsing.
Formatting means converting to a string; parsing means converting from a string.
Define subquery
A subquery is a query contained within another query’s lambda expression.