// HelloWorld.cs
//
namespace WroxComponents
{
using System;
/// <summary>
/// Summary description for HelloCS.
/// </summary>
public class HelloCS
{
/// <summary>
/// Creates a new instance of HelloCS
/// </summary>
public HelloCS()
{
}
/// <summary>
/// Custom method that returns a string
/// </summary>
public String SayHello()
{
return "Hello World - I'm a C# component!";
}
}
}
生成:
cd c:/BegASPNET11/Chapter13
md bin
csc /t:library /r:System.dll /out:bin/HelloWorldCS.dll HelloWorld.cs
pause