Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I reference classes in a .net executable?

Tags:

c#

.net

IL disassembler shows classes in a .Net executable that I would like to use in my project. How could I use those classes from my own project?

like image 308
thenextwebguy Avatar asked Apr 04 '10 23:04

thenextwebguy


People also ask

How do you call a class library in C#?

You can click the Browse tab, locate the folder where the library resides and select it. Call the Library class methods in your application : After selecting the library, you can click OK. You can then use the classes and methods of the library like you would use those of the . NET Framework.

What is class reference in C#?

In C#, classes and interfaces are reference types. Variables of reference types store references to their data (objects) in memory, and they do not contain the data itself. An object of type Object , string , or dynamic is also a reference type. SportsCar sc = new SportsCar(100);

How do I add a class library to an existing project?

Create a class library project. Add a new . NET class library project named "StringLibrary" to the solution. Right-click on the solution in Solution Explorer and select Add > New Project.


1 Answers

From your project on Visual Studio add a reference to that executable and you should have access to the public classes it defines. An executable is an assembly like any other.

like image 152
Otávio Décio Avatar answered Sep 21 '22 02:09

Otávio Décio