L
Larry__Weiss
Can a C# program find out what language an assembly (or components
thereof) is written in?
- Larry
thereof) is written in?
- Larry
All assemblies are written in IL.Larry__Weiss said:Can a C# program find out what language an assembly (or components
thereof) is written in?
Jeroen said:All assemblies are written in IL.
Or to put it differently, it's impossible to do this with any sort of
reliability. You can guess at it heuristically: for example, all
assemblies compiled with the C# compiler will have a private "<Module>"
class; those compiled with the VB.NET compiler will not (they have other
telltale signs, like having a class with a StandardModuleAttribute).
However, drawing conclusions from this is dubious at best, and it would
be hitting a moving target.
To dig a little deeper, why are there currently those telltale heuristic
differences? Do they indicate any basic differences in what can be
implemented in C# compared to what can be implemented with VB.NET ?