Lecture overview -- Keyboard shortcut: 'u'  Previous page: Parameter Arrays -- Keyboard shortcut: 'p'  Next page: Methods versus Properties versus Indexers -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Data Access, Properties, and Methods - slide 28 : 29

Extension Methods
In C# 3.0 an extension method defines an instance method in an existing class without altering the definition of the class.
Client-v1.cs
Motivation: A Client of Point without use of DistanceTo.
Client.cs
A Client of class Point which uses an extension method DistanceTo.
PointExtensions.cs
The static class PointExtensions.
Go to exercise
Extending struct Double