❔ Check if Type is static
This question is probably vague as shit, but I always do this check to ensure a type is static:
So, this works because static classes are declared abstract and sealed at the IL level.
My question is if this is actually valid and won't fail, ever. C# doesn't exactly have a
isStatic
field or something.4 Replies
This should be fine (I think), because all static classses are "sealed abstract"
GitHub
ModularDoc/ClassDef.cs at 23c5d2daf99f539d77bf8d104df384b5e6bf075d ...
Modular documentation generator for .NET libraries. Currently supporting Markdown only for GitHub, GitLab, and Bitbucket - ModularDoc/ClassDef.cs at 23c5d2daf99f539d77bf8d104df384b5e6bf075d · hails...
Yes it is valid
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.