Information Technology Reference
In-Depth Information
PrintOut("Initial Order: ", MyMc); // Print the initial array.
Array.Sort( MyMc ); // Sort the array.
PrintOut("Sorted Order: ", MyMc); // Print the sorted array.
}
}
This code produces the following output:
Initial Order: 20 4 16 9 2
Sorted Order: 2 4 9 16 20
Declaring an Interface
The previous section used an interface that was already declared in the BCL. In this section,
you'll see how to declare interfaces.
The important things to know about declaring an interface are the following:
￿
An interface declaration can only contain declarations of the following kinds of function
members:
-Methods
-Properties
-Events
-
Indexers
￿
The declarations of these function members cannot contain any implementation code.
Instead, a semicolon must be used for the body of each member declaration.
￿
An interface declaration cannot contain data members.
By convention, interface names begin with an uppercase I (e.g., ISaveable ).
￿
Search WWH ::




Custom Search