We know how interface works in C#. But in some cases, we encounter a situation where 2 interfaces have a method of same name and signature. Since your class or structure can inherit from multiple interfaces, there will be ambiguity about which method you want to call. To resolve this issue, we make use of
I have personally encountered such problem and I also searched all over the internet to find some solution for this problem. I finally found 2 solutions for this problem and both of them worked for me. So its time to share them with you, I hope it will fix your problem too. First Solution: Go
Interface is an another important pillar of object oriented programming. An interface only contains declaration of its members like properties, methods, delegates, and events, but not fields. Make sure, you should not provide implementation for any of its member inside the interface. To create an interface, we make use of interface keyword. By common naming
We have seen how properties work in C#. To assign values to properties, we create an instance of the class and assign them one by one in every new line. To simplify this process, we make use of Object Initializer. Object Initializer was introduced in C# 3.0 and it will definitely save your a lot
We have seen how a class and a structure work. They are pretty much similar in their functionality, but there are also certain differences between them. The 5 important differences are given below. A structure is of value type and a class is of reference type. A class can have a destructor, but a structure