We have two interfaces with the same method name and return type. can anybody tell me how to implement these two in same class.
Amit Soni
Try this in web application
interface
public partial class MyTestPage : System.Web.UI.Page,IClass1,IClass2
{
((
}
Response.Write(
Sarath babu G
Interface Ihello1
void hello();
Interface Ihello2
public class Imphello : Ihello1,Ihello2
void Ihello1.hello()
console.Writeline("interface 1 hello");
void Ihello2.hello()
console.Writeline("interface 2 hello");
public static void Main()
Imphello obj = new Imphello();
obj.Ihello1.hello();
obj.Ihello2.hello();
/*but it throw error that Ihello1.hello() and Ihello2.hello(); not present in the class.
one more thing we have to implement this without creating two instances like Ihello1 obj = new Imphello(); and Ihello2 obj = new Imphello(); give the ans */