I am trying to learn more about the CLR and at the same time noticed that the next interface in C # will be compiled into IL, which contains some kind of "abstract interface".
Given that declaring an interface as abstract in C # is unacceptable, does this mean that allowing an abstract interface at the IL level? Initially, I wondered if this was how the runtime is an interface, declaring an abstract class, thereby preventing its appearance.
This seems to follow this idea as shown by .class . However, after that interface . Thus, the idea of creating an abstract class seems controversial when the runtime already supports the concept of an interface.
This leads me to two questions:
- What is the purpose of an abstract interface and why is an abstract interface valid at the IL level?
- Why are
.class and interface needed, and why is it really at the IL level? - If the runtime supports the concept of an interface, why
.class or abstract is required?
WITH#:
public interface IExample { void SomeMethod(int number); }
IL:
.class interface public auto ansi abstract IExample {
source share