animal.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace work094
{
public class Animal
{
private string _type;
public string Type
{
get
{
return this._type;
}
set
{
this._type = value;
}
}
}
}
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 work094
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
work094.Animal bird = new Animal();
bird.Type = "BIRD";
work094.Animal cat = new Animal();
cat.Type = "CAT";
Response.Write(bird.Type);
Response.Write("<br>");
Response.Write(cat.Type);
}
}
}