Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Declare same method Name and same signature ..Is it possible in C# ?

Like

Interface I1
{

int Add(int i1, int i2);

int Add(int i1, int i2);

}
class chileClass : I1
{

//How can I implement here if that is possible?
}
Posted
Comments
DGKumar 5-Aug-13 3:24am    
It has asked by CTS interviewer?
then i confused.
for clarification i have asked u.
Thanks for reply.
Pheonyx 5-Aug-13 3:39am    
No problem, I think you aught to read up on Interfaces and Abstract classes based on this and the other question you asked. There is a lot of information available on the internet and I found it extremely helpful when I was trying to understand them. I would also advise looking at Abstract and Virtual methods.

I do not believe this is possible, why would you want to do that?
 
Share this answer
 
No it is not possible, because it makes no sense: how do you (and the compiler and the runtime) would distinguish between the two?
 
Share this answer
 
Comments
Maciej Los 5-Aug-13 4:07am    
Agree, it makes no sense at all!
A 5!
See my answer.
No, its not possible. Let us know the requirement so we might give you some idea
 
Share this answer
 
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900