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
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 |
Explain the Different types of configuration files in .net?
Advantages of c# over vb.net?
What is a multi line comment?
i have a question which is quite simple but yet complicated for me my question is why do we use void, if it does not return anything to the compiler? if it is used for normal display it can also be done by what is called Console.Write() or Consol.WriteLine() and if i do not use void with my method then my compiler throws me an error. if i return a value say integer then i write public int fun() display of the result can also be done here then why is it so necessary to use void with a function and why so compiler throw us an error if v don't use void return type?
What is static variable in c#?
Explain the three test cases in unit testing?
Why c# is called c sharp?
What is Named parameter in C#?
How can you read 3rd line from a text file?
Which of the following API is used to hide a window?
Give examples for reference types?
What is the use of "default" and "Using" keyword?