How to call a function when a class implements 2 interfaces and function is present in both interfaces?

Answers were Sorted based on User's Feedback



How to call a function when a class implements 2 interfaces and function is present in both interfac..

Answer / maruthi

interface name . function name

Is This Answer Correct ?    10 Yes 1 No

How to call a function when a class implements 2 interfaces and function is present in both interfac..

Answer / mahesh babu ummaneni

we have two interfaces inclass thet two interfaces having same method name the time wecan call based on interface

example
interface1
{
add()
}
interface2
{
add()
sub()
}
class classname:interface1,interface2
{
'now wewant call the method add from interface1
interface1.add()
'now we want call the method add from interface2
interface2.add()
'now we want call the method sub() from interface2
interface2.sub()
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Do we get an error while executing the “finally” block in c#?

0 Answers  


What is difference between interface and abstraction?

0 Answers  


Hi to all..I have to create an intranet application on C#.NET windows Application so please please let can you people help me as iam new in .NET and if u have any samples or website address from where i can get sample please let know.

0 Answers   ABB, TCS,


What is an escape sequence?

0 Answers  


What is desktop application testing?

0 Answers  






Difference between string and stringbuilder?

3 Answers   HCL, Siemens, TCS,


what will be the output of the given below coding. using System; public class Exercise { static void OddNumbers(int a) { if (a >= 1) { Console.Write("{0}, ", a); a -= 2; OddNumbers(a); } } public static int Main() { const int Number = 9; Console.WriteLine("Odd Numbers"); OddNumbers(Number); Console.WriteLine(); return 0; } }

1 Answers   iGate,


Why are dynamic link library used over static one?

0 Answers   C DAC,


Are private class-level variables inherited?

5 Answers  


How to generate strong name key file or which command is used to generated strong name key file?

0 Answers   CitiusTech,


Can we have multiple threads in one app domain?

0 Answers  


Explain inheritance in c#?

0 Answers  


Categories