没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class person
{
private string _name;
private int _money;
public person(string name, int money)
{
this._name = name;
this._money = money;
}
public string name
{
get { return _name; }
set { _name = value; }
}
public int money
{
get { return _money; }
set { _money = value; }
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class person
{
private string _name;
private int _money;
public person(string name, int money)
{
this._name = name;
this._money = money;
}
public string name
{
get { return _name; }
set { _name = value; }
}
public int money
{
get { return _money; }
set { _money = value; }
}
class menu
{
static void Main(string[] args)
{
List<person> ls1 = new List<person>();
person p1 = new person("张", 150);
person p2 = new person("李", 0);
person p3 = new person("王", 100);
person p4 = new person("陈", 50);
ls1.Add(p1);
ls1.Add(p2);
ls1.Add(p3);
ls1.Add(p4);
//ls1.AddRange(new person[]{new person("王",20),new person("照",6)});
//集体加入元素
List<person> ls2 = new List<person>();
person t1 = new person("张", 50);
person t2 = new person("李", 150);
person t3 = new person("王", 0);
person t4 = new person("陈", 100);
ls2.Add(t1);
ls2.Add(t2);
ls2.Add(t3);
ls2.Add(t4);
List<int> ls3 = new List<int>();
List<int> ls4 = new List<int>();
//list.removeat(0); 删除下标为0的元素
剩余5页未读,继续阅读
资源评论
isacc413
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功