References to other assemblies

T

Tony Johansson

Hello!

Assume I have this simple program below. Here I use another assembly when
calling Console.WriteLine(...);
The code for this method WriteLine is located in another Assembly which is
mscorlib.dll
Now to my question in the assembly which is created for this program is
there a reference
to the assembly mscorlib.dll ?
More precise in the assemblies manifest is the reference to the assembly
mscorlib.dll.

static void main(string[] args)
{ Console.WriteLine("Hello"); }

//Tony
 
A

Alberto Poblacion

Tony Johansson said:
Assume I have this simple program below. Here I use another assembly when
calling Console.WriteLine(...);
The code for this method WriteLine is located in another Assembly which is
mscorlib.dll
Now to my question in the assembly which is created for this program is
there a reference
to the assembly mscorlib.dll ?

Yes, there is. If you use ILDASM to examine your assembly, as I suggested in
another message, you can open the MANIFEST node and you will find a
reference similar to this one:

..assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
.ver 2:0:0:0
}
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello!

Assume I have this simple program below. Here I use another assembly when
calling Console.WriteLine(...);
The code for this method WriteLine is located in another Assembly which is
mscorlib.dll
Now to my question in the assembly which is created for this program is
there a reference
to the assembly mscorlib.dll ?
More precise in the assemblies manifest is the reference to the assembly
mscorlib.dll.

static void main(string[] args)
{ Console.WriteLine("Hello"); }

//Tony

Of course, each assembly store which assemblies it needs to be loaded
in order to run
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top