INFO5060 - Exam Flashcards
Assemblies contain compiled code in what format?
Common Intermediate Language (CIL)
What are assemblies?
.NET components
What translates CIL to machine code at runtime?
Common Language Runtime (CLR)
What file extension does a library have?
.dll
What is reflection?
Obtaining assembly metadata at runtime
What is the high-level metadata about an assembly called?
Manifest
ildasm.exe
CIL Disassembler used to view assembly metadata
What are the 2 scenarios for assembly binding?
- CLR learns about required library from manifest
- CLR instructed to load library from client code
How do you redirect the CLR to look for a library somewhere other than the client folder?
.json configuration
Where is the library assembly loaded into memory?
It shares the dedicated memory of the client that calls it.
Can 2 executables share the same library?
No, each gets its own copy in memory.
What is included in a signed assembly?
Fully-qualified or strong name (encrypted signature)
What is meant by “lifetime of managed objects is nondeterministic”?
Don’t know when it will be released or destroyed because it is handled by the garbage collector
What are 2 examples of unmanaged resources?
- Files
- Database connections
How do you deal with unmanaged resources?
Dispose pattern
What interface is implemented to finalize unmanaged objects?
IDisposable
How do you specify a Finalize method?
Destructor (~)
What is early binding?
Client gets type information at design time
(adding a reference)