• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

Interface overloading

Hi

I was asked in an interview about interface overloading in .net.



Could you please tell me an site to explain this concept
0
KaranGupta
Asked:
KaranGupta
1 Solution
 
abelallenCommented:
Hi KaranGupta,

Of course, interface can also have overloaded members. Just see the below code for instance..
interface ITest
{
   void F();                     // F()
   void F(int x);                  // F(int)
   void F(ref int x);            // F(ref int)
   void F(int x, int y);         // F(int, int)
   int F(string s);               // F(string)
   int F(int x);                  // F(int)         error
   void F(string[] a);            // F(string[])
   void F(params string[] a);      // F(string[])      error
}

You can read the full story at the following location
http://msdn.microsoft.com/en-us/library/aa691131%28VS.71%29.aspx

Kindly add your comment if it was an ample solution for your doubt.

Regards,
Abel Allen
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now