using
System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Test01Bag
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public class Product
{
#region 商品类
/// <summary>
/// 商品重量泛型List存储
/// </summary>
private List < int > weight = new List < int > ();
public List < int > Weight
{
get { return weight; }
set { weight = value; }
}
private List < int > value = new List < int > ();
/// <summary>
/// 商品价值泛型List存储
/// </summary>
public List < int > Value
{
get { return this .value; }
set { this .value = value; }
}
private int count;
/// <summary>
/// 商品数量
/// </summary>
public int Count
{
get
{
count = weight.Count;
return count;
}
}
/// <summary>
/// 添加商品信息
/// </summary>
/// <param name="w"> 重量 </param> <
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Test01Bag
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public class Product
{
#region 商品类
/// <summary>
/// 商品重量泛型List存储
/// </summary>
private List < int > weight = new List < int > ();
public List < int > Weight
{
get { return weight; }
set { weight = value; }
}
private List < int > value = new List < int > ();
/// <summary>
/// 商品价值泛型List存储
/// </summary>
public List < int > Value
{
get { return this .value; }
set { this .value = value; }
}
private int count;
/// <summary>
/// 商品数量
/// </summary>
public int Count
{
get
{
count = weight.Count;
return count;
}
}
/// <summary>
/// 添加商品信息
/// </summary>
/// <param name="w"> 重量 </param> <