DLL的应用。

csc /target:library OutPut.cs

csc /reference:OutPut.dll class1.cs

一:

using System;
public class OutPut
{
private string OutPutWord;
public OutPut(string OutWord)
{
OutPutWord=OutWord;
Console.WriteLine(OutPutWord);
}
}

二:

using System;

namespace ConsoleApplication5
{

///

1<summary>   
2/// Class1 的摘要说明。   
3/// </summary>

class Class1
{
///

1<summary>   
2/// 应用程序的主入口点。   
3/// </summary>

[STAThread]
static void Main(string[] args)
{
OutPut h=new OutPut("HelloWorld!");

// TODO: 在此处添加代码以启动应用程序
//
}
}
}

Published At
Categories with Web编程
Tagged with
comments powered by Disqus