Inheritance Attribute: What does it do?

I came across an attribute in C # called [Inheritance] . Microsoft attribute documentation is somewhat limited. An attribute has only one property, which is an enumeration that they call the level of inheritance . This is about everything I could find, by search. So here are my questions:

  • Is the attribute really doing something or is it just a designation?

  • If he does something, does he ensure inheritance (or lack thereof) by throwing a compile-time error?

  • Or can it actually change what is inherited? ex) InheritanceLevel.NotInherited , does it cancel inheritance?

+4
source share
1 answer
  • It does nothing, it is the notation used inside the compiler / linker

  • N / a

  • N / a

+3
source

Source: https://habr.com/ru/post/1389098/


All Articles