请问 public class Product
{
public string Name{get; set;}
public string Category { get; set; }
public double Price { get; set; }
}
和 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace Model
{
public class Product
{
public string _Name;
public string _Category;
public double _Price;
public string Name
{
set
{
_Name = value;
}
get
{
return _Name;
}
}
public string Category
{
set
{
_Category = value;
}
get
{
return _Category;
}
}
public double Price
{
set
{
_Price = value;
}
get
{
return _Price;
}
}
}
}============================================================有什么区别么 各有什么好处和作用呢 初学,谢谢各位大虾
{
public string Name{get; set;}
public string Category { get; set; }
public double Price { get; set; }
}
和 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace Model
{
public class Product
{
public string _Name;
public string _Category;
public double _Price;
public string Name
{
set
{
_Name = value;
}
get
{
return _Name;
}
}
public string Category
{
set
{
_Category = value;
}
get
{
return _Category;
}
}
public double Price
{
set
{
_Price = value;
}
get
{
return _Price;
}
}
}
}============================================================有什么区别么 各有什么好处和作用呢 初学,谢谢各位大虾
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货