Today someone asked me, how to find static class from list of types. I was against the implementation he was doing, but still I couldn’t find how to find static class. Later I did some research and I found like you need to look for ** IsAbstract ** and IsSealed properties of the type.
Here is source code, which identify the static class from the list of available types in the assembly.
If you run the above code, it will print the StaticClass name.
Happy Programming :)
What do you think? I would like to hear your thoughts, suggestions, and questions in the comments section below.
Did you like this article? Share it with your friends