using System;
public class Square
{
private int sidelong;
public Square()
{
Console.WriteLine ("我没有参数.");
}
public Square(int sidelong)
{
this.sidelong=sidelong;
}
public int Setsidelong(int sidelong)
{
this.sidelong=sidelong;
return sidelong;
}
public int Getsidelong(int sidelong)
{
return sidelong;
}
public void Print()
{
Console.WriteLine ("当前正方形的边长是:{0}",sidelong);
}
}
class Square_Test
{
public static void Main()
{
Square s1=new Square ();
s1.Setsidelong (4);
s1.Print ();
Square s2=new Square ();
}
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。