Search code examples
c#roslynroslyn-code-analysis

What does TypeKind.Submission and TypeKind.Module mean in the Microsoft.CodeAnalysis.TypeKind enum?


I've encountered TypeKind enum: https://learn.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.typekind?view=roslyn-dotnet

Could anybody explain what does TypeKind.Submission mean? What types are "interactive submissions"?

Also what is TypeKind.Module? What is module type?


Solution

  • Module is the VB keyword for a static class.

    In C#, it becomes a class.


    TypeKind.Submission refers to the auto-generated class used to hold variables in interactive sessions. (src)