Interface overloading


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

Could you please tell me an site to explain this concept
Who is Participating?
abelallenConnect With a Mentor Commented:
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

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

Abel Allen
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.