What is an internal sealed class in C#?

后端 未结 6 459
长情又很酷
长情又很酷 2021-01-31 13:31

I was looking through some C# code for extending language support in VS2010 (Ook example). I saw some classes called internal sealed class

What do these do?

6条回答
  •  感情败类
    2021-01-31 14:09

    Internal means it can be used only in same assembly,

    The internal keyword is an access modifier for types and type members. Internal types or members are accessible only within files in the same assembly

    sealed that can't be inherited

    A sealed class cannot be inherited. It is an error to use a sealed class as a base class. Use the sealed modifier in a class declaration to prevent inheritance of the class.

提交回复
热议问题