NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

3.4 Signatures and overloading

Methods, constructors, indexers, and operators are characterized by their signatures:

Signatures are the enabling mechanism for overloading of members in classes, structs, and interfaces:

The following example shows a set of overloaded method declarations along with their signatures.

interface ITest
{
   void F();               // F()
   void F(int x);            // F(int)
   void F(ref int x);      // F(ref int)
   void F(out int x);      // F(out int)
   void F(int x, int y);   // F(int, int)
   int F(string s);         // F(string)
   int F(int x);            // F(int)
}

Note that parameter modifiers are part of a signature. Thus, F(int), F(ref int), and F(out int) are all unique signatures. Furthermore note that even though the second and last method declarations differ in return types, their signatures are both F(int). Thus, compiling the above example would produce errors for the second and last methods.