Friday, June 20, 2025

C# Assembly Related Questions

  1. What is .NET Assembly?
  2. Assembly is logical grouping of files.
  3. What is meant by .NET Programmers?
  4. How can use CSC.exe to compile CSharp file and generate assembly file?
  5. What are different important switches of csc.exe command?
  6. Write CSharpClass and VBClass source code for Hello World using Hello() and World() methods respectively. Compile these files and generate DLL files. Create another Program.cs file which uses/references these DLL files. Compile the Program file and generate EXE file.
  7. Explain the following commands in CMD:
    • > type Program.cs
    • > notepad Test.vb
    • >vbc /target:library /out:VBAssembly.dll VBClass.vb
    • >csc /target:library /out:CSharpAssembly.dll CSharpClass.cs
    • >csc /target:exe /r:CSharpAssembly.dll /r:VBAssembly.dll /out:Program.exe Program.cs
    • >ildasm /out:notes.txt CSharpAssembly.dll
  8. How many modules are generally in a .NET assembly?
  9. How is module different from .NET assembly?
  10. How to compile a CSharp file as module using csc.exe command?
  11. Create two modules and combine them using csc commands? (Hints use /addmodule switch)
  12. What is meant by multi-file assembly?
  13. Create ModuleA and ModuleB. Combine them as Assembly1.Next, Create ModuleC and ModuleB. Combine them as Assembly2. Next, run both assemblies.
  14. What is assembly manifest?
  15. Suppose that a CSharp file without Main method is compiled into EXE assembly file. Will this assembly have entrypoint? On the other hand, suppose that a CSharp file with Main method is compiled into DLL assembly file. Will this assembly have entrypoint?
  16. What is difference between Console Application and Windows Application at assembly level?
  17. Is JIT compiler invoked when EXE file is run?
  18. Explain about Assembly Name, Version, Public Key Token and Culture. How does they help in identifying an assembly uniquely?
  19. How is AssemblyInfo.cs file created in Visual Studio? What information does it contain?
  20. How is Strong Name key file generated using command line? What does strong name key file?
  21. What is .NET Global Assembly Cache? Do we still use it in .NET Core?

No comments:

Post a Comment

Hot Topics