문제

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