评论

收藏

[R语言] asp.net代码练习 work087

编程语言 编程语言 发布于:2021-12-17 23:11 | 阅读数:465 | 评论:0

animal.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace work087
{
  public class Animal
  {
    public string color;  //颜色 
    public bool haveFeather; //羽毛
    public int age; //岁数
  }
}
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 work087
{
  public partial class WebForm1 : System.Web.UI.Page
  {
    protected void Page_Load(object sender, EventArgs e)
    {
      work087.Animal bird = new Animal();
      bird.color = "颜色";
      bird.haveFeather = true;
      bird.age = 5;
      //无报错,即为ok
    }
  }
}

关注下面的标签,发现更多相似文章