Member Access
One thing we’ve been dealing with all the time without giving it explicit attention is the concept of member access, indicated by the period (.) token:
Console.WriteLine("Hello");person.Age = 26;placeOrder.Click += placeOrder_Click;
Here we’re respectively looking up a method, a property, and an event using the member access. Members are what types consist of and are accessible either through the type itself (as in the first case, called a static method) or through a type’s instances (as in the latter two cases). Fields can be accessed in a similar way.
Note: Generics
Sometimes member access is paired with the specification of type arguments in the context of generics. A method itself may need a type argument, which is specified ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access