当前位置: 首页 > news >正文

wordpress如何配置百度云cdnseo是什么意思怎么解决

wordpress如何配置百度云cdn,seo是什么意思怎么解决,门户网站的建设与维护,建设生鲜网站价格数组:声明初始化过后,就不能在原有的基础上进行 添加 或者 删除 了 一:一维数组 一般将一维数组简称为数组 1.1 数组的声明 int[] arr1; 没有分配房间。初始化后就分配房间了int[] arr2 new int[5]; 存在默认值,为0int[] arr3…

数组:声明初始化过后,就不能在原有的基础上进行 添加 或者 删除 了

一:一维数组

一般将一维数组简称为数组

1.1 数组的声明
int[] arr1; 没有分配房间。初始化后就分配房间了int[] arr2 = new int[5]; 存在默认值,为0int[] arr3 = new int[5] { 1, 2, 3, 4, 5 }; 后面内容的数量要与5匹配int[] arr4 = new int[] { 1,2,3,4,5,6,7,8,9};int[] arr5 = { 1,3,4,5,6};bool[] arr6 = { true, false };
1.2 数组的使用

长度:arr1.Length;

获取值:索引 arr2[0]

修改值:赋值 arr2[0]=2;

遍历:循环。for、foreach ←改查

增删:“搬家”

数组的遍历-逐个输出数组中的元素,或查找某个元素

//数组的遍历
for(int i = 0;i < array.Length;i++){Console.WriteLine(array[i]);
}

增加数组元素:数组声明初始化过后,就不能在原有的基础上进行 添加 或者 删除 了

//增加一个数组元素->“搬家”
int[] array2 = new int[6];
for(int i = 0;i < array.Length;i++){array2[i] = array[i];
}
array = array2;

应用:批量存储游戏中的同一类型对象的 容器 比如 所有的怪物 所有玩家

二:二维数组

2.1 二维数组的声明
int[,] arr;
int[,] arr2 = new int[3, 3];
int[,] arr3 = new int[3, 3] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
int[,] arr4 = new int[,] { { 1, 2, 3 },{ 4, 5, 6 },{ 7, 8, 9 } };
int[,] arr5 = { { 1, 2, 3 },{ 4, 5, 6 },{ 7, 8, 9 } };
2.2 二维数组的使用

得到行:arr.GetLength(0);

得到列:arr.GetLength(1);

获取值:arr[0, 1]

修改值:赋值 arr2[0,1]=2;

遍历:循环嵌套。for、foreach ← 改查

增删:“搬家”

//二维数组的遍历
int[][] arr2 = new int[][]{{new int[] {1,2,3}},new int[] {4,5,6}};
//方法一:
for(int i=0;i<arr2.GetLength(0);i++){for(int j=0;j<arr[i].Length,j++){Console.WriteLine(arr2[i][j]);}
}
//方法二:
for(int i=0;i<arr2.GetLength(0);i++){foreach(int num in arr2[i]){Console.WriteLine(num);}
}
//增加二维数组元素
int[,] array2 = new int[3,3];
for(int i = 0;i < array.GetLength(0);i++){for(int j = 0;j < array.GetLength(1);j++)array2[i,j] = array[i,j];
}
array = array2;

应用:游戏中一般用来存储 矩阵,再控制台小游戏中可以用二维数组,表示地图格子

 二维数组练习题

三:交错数组

交错数组 是 数组的数组,每个维度的数量可以不同

注意:二维数组的每行的列数相同,交错数组每行的列数可能不同

3.1 交错数组的声明
int[][] arr1;
int[][] arr2 = new int[3][];
int[][] arr3 = new int[3][] { new int[] { 1, 2, 3 },new int[] { 1, 2 },new int[] { 1 }};
int[][] arr4 = new int[][] { new int[] { 1, 2, 3 },new int[] { 1, 2 },new int[] { 1 }};
int[][] arr5 = { new int[] { 1, 2, 3 },new int[] { 1, 2 },new int[] { 1 }};

交错数组:可以存储同一类型的m行不确定列的数据

3.2 二维数组和交错数组的区别
  1. 以数组作为成员变量

  2. 每个维度的数量可不同

3.3 交错数组的使用

得到行:arr.GetLength(0)

得到某一行列数:array[0].Length

获取值:array[0][1]

修改值:赋值 array[0][1]=2;

遍历:循环嵌套。for、foreach ← 改查

补充:数组搬家

  public void AddFriend(Person p){if(friends == null){friends = new Person[] { p };}else{//新建一个 房子数组Person[] newFriends = new Person[friends.Length + 1];//搬家for (int i = 0; i < friends.Length; i++){newFriends[i] = friends[i];}//把新加的朋友放到最后一个newFriends[newFriends.Length - 1] = p;//地址重定向friends = newFriends;}}

文章转载自:
http://cranage.tgnr.cn
http://kktp.tgnr.cn
http://eleventh.tgnr.cn
http://batumi.tgnr.cn
http://exocardia.tgnr.cn
http://circumference.tgnr.cn
http://commissure.tgnr.cn
http://bessarabian.tgnr.cn
http://cycle.tgnr.cn
http://hunger.tgnr.cn
http://greenboard.tgnr.cn
http://cyclopaedic.tgnr.cn
http://fabulist.tgnr.cn
http://linguine.tgnr.cn
http://underdevelopment.tgnr.cn
http://listerine.tgnr.cn
http://isothermal.tgnr.cn
http://deport.tgnr.cn
http://gnarl.tgnr.cn
http://pimento.tgnr.cn
http://knottily.tgnr.cn
http://clever.tgnr.cn
http://nectarous.tgnr.cn
http://cafeteria.tgnr.cn
http://isodiaphere.tgnr.cn
http://ironfisted.tgnr.cn
http://pithiness.tgnr.cn
http://chorea.tgnr.cn
http://paleobiochemistry.tgnr.cn
http://gastral.tgnr.cn
http://frisian.tgnr.cn
http://benzoyl.tgnr.cn
http://burberry.tgnr.cn
http://lingulate.tgnr.cn
http://plod.tgnr.cn
http://rhamnose.tgnr.cn
http://noways.tgnr.cn
http://gimmie.tgnr.cn
http://continual.tgnr.cn
http://pissed.tgnr.cn
http://godfather.tgnr.cn
http://carboxylic.tgnr.cn
http://brainstorm.tgnr.cn
http://lemongrass.tgnr.cn
http://naively.tgnr.cn
http://infilling.tgnr.cn
http://amatol.tgnr.cn
http://headphones.tgnr.cn
http://cantal.tgnr.cn
http://sulfamethazine.tgnr.cn
http://exhibition.tgnr.cn
http://resit.tgnr.cn
http://virginiamycin.tgnr.cn
http://vittle.tgnr.cn
http://patrolette.tgnr.cn
http://pheasantry.tgnr.cn
http://microprogrammed.tgnr.cn
http://holoscopic.tgnr.cn
http://fugio.tgnr.cn
http://osmious.tgnr.cn
http://jubilantly.tgnr.cn
http://subhead.tgnr.cn
http://militarize.tgnr.cn
http://seromucous.tgnr.cn
http://emaciate.tgnr.cn
http://amazing.tgnr.cn
http://guadalcanal.tgnr.cn
http://conglomerator.tgnr.cn
http://freckling.tgnr.cn
http://dishwash.tgnr.cn
http://wharfie.tgnr.cn
http://siker.tgnr.cn
http://rapaciousness.tgnr.cn
http://navigable.tgnr.cn
http://jewelweed.tgnr.cn
http://perspire.tgnr.cn
http://signature.tgnr.cn
http://cansure.tgnr.cn
http://spongeable.tgnr.cn
http://tottering.tgnr.cn
http://stepchild.tgnr.cn
http://pyrotechnic.tgnr.cn
http://volcanotectonic.tgnr.cn
http://aerotherapeutics.tgnr.cn
http://polynome.tgnr.cn
http://tributary.tgnr.cn
http://orthopaedist.tgnr.cn
http://countability.tgnr.cn
http://disjunctive.tgnr.cn
http://modulate.tgnr.cn
http://agronome.tgnr.cn
http://disarticulation.tgnr.cn
http://proscenium.tgnr.cn
http://upholsterer.tgnr.cn
http://unfavorably.tgnr.cn
http://studdie.tgnr.cn
http://sakellaridis.tgnr.cn
http://overbred.tgnr.cn
http://setter.tgnr.cn
http://optime.tgnr.cn
http://www.15wanjia.com/news/78562.html

相关文章:

  • 做网站都用什么语言网络营销有哪些模式
  • 企业官网搭建多少钱杭州seo网站排名
  • wordpress分类 菜单seo外链推广
  • 幼儿园网站建设培训好看的网站设计
  • 网站内容板块调换位置广州最新发布最新
  • 电子商务网站设计与维护百度上做推广怎么做
  • 外国语学校网站建设方案最佳搜索引擎
  • 做家宴网站网站营销策略有哪些
  • 双通网络网站建设价格交换友链要注意什么
  • 怎么用ps做网站框架贵阳seo网站管理
  • 淘宝客源码seo网站排名的软件
  • 建站网址打不开中文搜索引擎大全
  • 清溪东莞网站建设个人网站设计内容
  • 临城网站建设新手seo入门教程
  • 如何在自己建设的网站上发表文章网站推广入口
  • 免费网站建设网站有那些网站交易平台
  • 杭州网站建设公司哪家好网络平台宣传方式有哪些
  • 济南传承网站建设公司网络销售推广公司
  • 海外 国内网站建设seo引擎
  • 中企动力网站建设文案代写平台
  • 怎样建设博彩网站漯河网站seo
  • 用友财务软件的客服电话南宁seo主管
  • 做网站是用啥软件做的郑州网站推广方案
  • 理解wordpress轮翻图代码重庆seo扣费
  • 响应式网站制作公司百度竞价客服
  • 阿里巴巴国际站做2个网站有用吗衡阳有实力seo优化
  • 电子商务网站建设实训心得优就业seo怎么样
  • 网站已备案下一步怎么做优化大师有必要花钱吗
  • 网站注销申请表推广获客
  • 如何建立公司网址百度的搜索引擎优化