Laden...

classloader in C#

Erstellt von robmir vor 15 Jahren Letzter Beitrag vor 15 Jahren 1.861 Views
R
robmir Themenstarter:in
155 Beiträge seit 2005
vor 15 Jahren
classloader in C#

Hallo,

gibt es einen classloader in c# analog zu Java? Soweit ich weiß, arbeitet der classloader in Java hierarchisch wie funktionert es in C#.

In Java ist die *.jar Reihenfolge von Bedeutung in c# (für die dll's) nicht mehr. Welcher Ansatz hat mehr Vorteile in Java oder in C#?

Grüße

3.971 Beiträge seit 2006
vor 15 Jahren

In C# gibt es statischen Konstruktoren. Kann dir aber nicht sagen ob dass das selbe ist wie in Java

Es gibt 3 Arten von Menschen, die die bis 3 zählen können und die, die es nicht können...

S
443 Beiträge seit 2008
vor 15 Jahren

was tut der classloader?

// Edit:
ich tippe mal ins Blaue, Activator.CreateInstance(...)

mbg
Rossegger Robert
mehr fragen mehr wissen

Montag morgen ist die beste Zeit um eine erfolgreiche Woche zu beginnen

R
robmir Themenstarter:in
155 Beiträge seit 2005
vor 15 Jahren

What is a ClassLoader?
Among commercially popular programming languages, the Java language distinguishes itself by running on a Java virtual machine (JVM). This means that compiled programs are expressed in a special, platform-independent format, rather than in the format of the machine they are running on. This format differs from traditional executable program formats in a number of important ways.

In particular, a Java program, unlike one written in C or C++, isn't a single executable file, but instead is composed of many individual class files, each of which corresponds to a single Java class.
Additionally, these class files are not loaded into memory all at once, but rather are loaded on demand, as needed by the program. The ClassLoader is the part of the JVM that loads classes into memory.
The Java ClassLoader, furthermore, is written in the Java language itself. This means that it's easy to create your own ClassLoader without having to understand the finer details of the JVM.

S
443 Beiträge seit 2008
vor 15 Jahren

wenn ich das richtig verstanden habe übernimmt das die CLR in Verbindung mit JIT-Compiler.
da kann man nicht so viel reingreifen, denke ich.
falls Du den JIT-Compiler übergehen willst, kann man die Assembly vorkompilieren (pre-compile)
falls Du eine Assembly global verfügbar machen willst ist "GAC" das richtige Wort dafür

mbg
Rossegger Robert
mehr fragen mehr wissen

Montag morgen ist die beste Zeit um eine erfolgreiche Woche zu beginnen