Code
using System;
namespace _03_06{
class Car{
public string color;
private float weight;
private DateTime releasedate;
public static int count=0;
public string Color{
get{return color;}
set{color=value;}
}
public float Weight{
get{
return weight;}
set{weight=value;}}}
class Class_03_06{
public static void Main(String[] args)
{
Car car1=new Car();
car1.Color="black";
car1.Weight=1.0F;
Console.WriteLine("car1的颜色是"+car1.Color);
Console.WriteLine("car1的重量是"+car1.Weight);
}
}}
using System;
namespace _03_06{
class Car{
public string color;
private float weight;
private DateTime releasedate;
public static int count=0;
public string Color{
get{return color;}
set{color=value;}
}
public float Weight{
get{
return weight;}
set{weight=value;}}}
class Class_03_06{
public static void Main(String[] args)
{
Car car1=new Car();
car1.Color="black";
car1.Weight=1.0F;
Console.WriteLine("car1的颜色是"+car1.Color);
Console.WriteLine("car1的重量是"+car1.Weight);
}
}}