animal.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace work092
{
public class Animal
{
public string _name;
public Animal()
{
this._name = "动物";
}
~Animal()
{
this._name = string.Empty;
}
}
}
webform1.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace work092
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
work092.Animal an = new Animal();
Response.Write(an._name);
}
}
}