Question

Today I have seen the following:

Babo.UI.Library.Forms.MessageBox.Show("Text.", "Caption", MessageBoxButtons.OK, MessageBoxIcon.Error);

It seems, that the coder uses his own assembly. Whenever I create a new application, I copy and paste my code from A to B. Can I create and use my own assembly, too? Are there any code samples? Thanks in advance. Kind regards. ;)

Était-ce utile?

La solution

Create a class library. It will compile to a dll, which can then be added to your project.

Check out this article.

Autres conseils

Just create a Class Library project in Visual Studio and it will generate a dll (aka assembly) on compilation.

In fact, every exe or dll created in .NET is called an assembly.

When you want to reuse that, add the generated assembly as reference in your project, either by selecting it's file or, if in the same project, use a project reference.

You can just create a new Class Library project and reference to it.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top