Lecture overview -- Keyboard shortcut: 'u'  Previous page: Constraints on Formal Type Parameters -- Keyboard shortcut: 'p'  Next page: Another example of constraints -- 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    Generic Types and Methods - slide 10 : 21

Constraints: Strings of comparable elements
String<T> generalizes string of char to string of comparable elements
string.cs
The generic class String<T>.
app-1.cs
Illustrating a number of String<int> objects.
app-1-output
Output from the String<int> program.
app-2.cs
Illustrating Strings of different types.
app-2-output
Output from the String of different types program.
Go to exercise
Comparable Pairs