animal.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace work089
{
    public class Animal
    {
        public string output()
        {
            return "没有任何参数";
        }

        public string output(string out1)
        {
            return out1;
        }
    }
}

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 work089
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            work089.Animal bird = new Animal();
            bird.output();
            string str1 = "一只小鸟";
            bird.output(str1);

        }
    }
}