質問

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. ;)

役に立ちましたか?

解決

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

Check out this article.

他のヒント

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top