PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating a console application by using C#.
You need to access the assembly found in the file named car.dll.
Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
Assembly.Load();

B.
Assembly.GetExecutingAssembly();

C.
this.GetType();

D.
Assembly.LoadFile(“car.dll”);

7 Comments on “Which code segment should you use?

  1. Manab says:

    Assembly.LoadFile(String) – Loads the contents of an assembly file on the specified path.
    Assembly.Load(String) – Loads an assembly given the long form of its name.
    There is no method Assembly.Load(), so correct answer is D, but result is not an assembly, result is content of an assembly file.




    0



    0

Leave a Reply