Can a VB.NET .dll assembly be reflected by C#
I assume be开发者_运维技巧cause the CLR this wouldn't be an issue?
Yes. Reflection is a CLR technology and works on any CLS compliant, and sometimes not so compliant, assembly no matter the language which created it.
.NET doesn't care what language the assembly was written in, so your C# application will have no problem using reflection with a VB.NET assembly.
Any .NET language turns into IL bytecode when it's run through the compiler. Reflector and similar tools work by reverse-engineering the IL back into a higher-level syntax, but they don't necessarily produce the precise code that was compiled originally. They just provide you with a higher-level "approximation" which will compile into the same bytecode.
It's best to think of these tools as answering the question, "what could I have written to generate this result?" rather than, "what did the original author write to generate this result?"
精彩评论