版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/bayinglong/article/details/73496640
在团队开发的过程中,我们可以把一个项目拆分成无数个工作组件,分配到每一个开发小组。然后把它开发成一个个的组件,再通过一定的装配把它装配起来。编写一个软件就如同盖一栋楼房,是通过拼装组件的方式一步一步的完善系统的功能。
首先,建立一个类库,生成成功后保存。
namespace TiGaoBan
{
public class TGB
{
public static void show()
{
Console.WriteLine("欢迎来到c#组件!");
}
public static void show(string message)
{
Console.WriteLine(message);
}
}
}
其次,新建立一个控制台应用程序。
将上面的组件编译后引用到控制台应用程序。
using TiGaoBan;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
TGB.show();
Console.WriteLine("控制台中加入");
}
}
}
cult+F5,试试看,可以调用 ok