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

怎样学习做网站的编程微网站需要域名吗

怎样学习做网站的编程,微网站需要域名吗,怎样做企业的网站建设,云虚拟主机可以做视频网站不ArrayList 1:位于System.Collections命名空间下#xff0c; 2#xff1a;ArrayList的容量可以根据需要自动扩充 3#xff1a;只能是一维形式#xff0c;数组可以是多维的 4#xff1a;提供添加、删除、和插入某一范围元素的方法 三种构造方法 1) ArrayList list1 n…ArrayList 1:位于System.Collections命名空间下 2ArrayList的容量可以根据需要自动扩充 3只能是一维形式数组可以是多维的 4提供添加、删除、和插入某一范围元素的方法 三种构造方法 1) ArrayList list1 new ArrayList(); 2) int[] arr new int[]{} ; ArrayList list2 new ArrayList(arr) ; 3) ArrayList list3 new ArrayList(10) ; ArrayList的属性 1Capacity ---获取或设置ArrayList可包含的元素 2Count---获取实际包含的元素数 3IsFixedSize ---获取一个值指示是否具有固定大小 4IsReadOnly--- 是否为只读。 ArrayList的方法 1public virtual int Add(Object value)  2)  public virtual void Insert(int index, Object value) 3) InsertRange(int Index, 一维数组的名称)  4) public virtual void  Clear() --移除所有元素 5public virtual void Remove(Object obhj) ---删除指定的元素 6public virtual void RemoveAt(int Index) ---删除指定索引的元素 7public virtual void RemoveRange(int index, int count)--删除指定的多个元素 8 foreach遍历ArrayList 9 IndexOf(A) ---返回A第一次出现的索引的位置未找到的话返回-1 10 IndexOf(A, 7) ---从索引7开始查找未找到返回-1 11 LastIndexOf(A) ---最后一次出现A的索引 12LastIndexOf(A, 7)---下标0~7这段最后一次出现A的位置索引 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; //ArrayList类位于System.Collections命名空间内 using System.Collections;//ArrayList是一种动态数组 //ArrayList的容量可以根据需要自动扩充 //ArrayList提供了添加删除和插入某一范围元素的方法 //Array List提供了将只读和固定大小包装返回集合的方法数组不提供 //Array List只能是一维的形式数组可以多维namespace ArrayListDemo01 {internal class Program{static void Main(string[] args){//ArrayList的构造函数//以默认16位大小来初始化内部的数组ArrayList list new ArrayList();//用一个ICollection对象来构造并把集合的元素添加到ArrayList中int[] arr1 {10,9,8,7,6,5,4,3,2,1,0,11,12,13,14,15,16};ArrayList list1 new ArrayList(arr1 );//用指定大小初始化内部数组ArrayList list2 new ArrayList(20);Console.WriteLine(list中包含的元素数为);//ArrayList的属性Capacity获取或设置ArrayList中可包含的的元素数Console.WriteLine(list.Capacity);list.Capacity 10;Console.WriteLine(list可以包含的元素数);Console.WriteLine(list.Capacity);//ArrayList中的属性Count是获取实际包含的元素数//如果ArrayList没有被初始化那么count0;Console.WriteLine(list中实际包含的元素数);Console.WriteLine(list.Count);//ArrayList的初始化for(int i0; ilist.Capacity; i){list.Add(i);}Console.WriteLine(初始化后list内包含的元素数);Console.WriteLine(list.Count);//常用的属性及说明//IsFixedSizeConsole.WriteLine(list1.IsFixedSize); //false//IsReadOnlyConsole.WriteLine(list1.IsReadOnly); //false //Item 获取或设置指定索引处的元素//和数组访问元素的方法一样Console.WriteLine(list1[5]);//ArrayList中的方法//public virtual int Add(Object value)//virtual方法在派生类中可以不重写有方法体//抽象方法只有声明没有方法体派生类中必须重写list1.Add(17);list1.Add(18);foreach(int i in list1){Console.Write(i );}Console.WriteLine();//Insert(), 插入元素//public virtual void Insert(int index, Object value)list1.Insert(0, 100);foreach (int i in list1){Console.Write(i );}Console.WriteLine();//ArrayList插入一个数组//InsertRange()int[] arr2 {11,22,33,44,55,66,77 };list1.InsertRange(5,arr2);foreach (int i in list1){Console.Write(i );}Console.WriteLine();//ArrayList删除一个元素int[] array {11,2,3,44,55,55,55,66,77,88,99,100,101,102 };ArrayList al1 new ArrayList(array);//Remove()从ArrayList中移除特定对象的第一个匹配项al1.Remove(55);//括号里面是ArrayList中的元素foreach (int i in al1){Console.Write(i );}Console.WriteLine();//RemoveAt()移除指定索引的元素al1.RemoveAt(5);//括号里面是索引foreach (int i in al1){Console.Write(i );}Console.WriteLine();//RemoveRange()//public virtual void RemoveRange(int index, int count)al1.RemoveRange(4, 3);foreach (int i in al1){Console.Write(i );}Console.WriteLine();//clear()删除所有元素al1.Clear();Console.WriteLine(al1.Count);//获取实际包含的元素数Console.WriteLine(al1.Capacity);//获取或设置可包含的元素数Console.WriteLine();int[] al2 new int[] { 11, 33, 2, 5, 10, 10, 10, 15, 63, 64, 54 };ArrayList arrList new ArrayList(al2);//Indexof(A)返回第一次出现的索引位置未找到返回-1Console.WriteLine(第一次出现10的索引位置为{0} , arrList.IndexOf(10));//IndexOf(A, 7)从索引7开始查找未找到返回-1,包含7这个索引位置Console.WriteLine(arrList.IndexOf(10, 5));//5//LastIndexOf(10)从后面开始检索10第一次出现的索引Console.WriteLine(arrList.LastIndexOf(10));//6从Console.WriteLine(arrList.LastIndexOf(10, 4));//4//public virtual bool Contains(Object item)Console.WriteLine(arrList.Contains(20));//falseConsole.WriteLine(arrList.Contains(10));//true}} }
文章转载自:
http://www.morning.jspnx.cn.gov.cn.jspnx.cn
http://www.morning.mdplm.cn.gov.cn.mdplm.cn
http://www.morning.dnhdp.cn.gov.cn.dnhdp.cn
http://www.morning.gycyt.cn.gov.cn.gycyt.cn
http://www.morning.xlztn.cn.gov.cn.xlztn.cn
http://www.morning.ljzgf.cn.gov.cn.ljzgf.cn
http://www.morning.kbfzp.cn.gov.cn.kbfzp.cn
http://www.morning.skmpj.cn.gov.cn.skmpj.cn
http://www.morning.drcnf.cn.gov.cn.drcnf.cn
http://www.morning.rqqmd.cn.gov.cn.rqqmd.cn
http://www.morning.gbyng.cn.gov.cn.gbyng.cn
http://www.morning.jhkzl.cn.gov.cn.jhkzl.cn
http://www.morning.bflws.cn.gov.cn.bflws.cn
http://www.morning.zhnpj.cn.gov.cn.zhnpj.cn
http://www.morning.bhrkx.cn.gov.cn.bhrkx.cn
http://www.morning.cgbgc.cn.gov.cn.cgbgc.cn
http://www.morning.cbnjt.cn.gov.cn.cbnjt.cn
http://www.morning.ypmqy.cn.gov.cn.ypmqy.cn
http://www.morning.wdqhg.cn.gov.cn.wdqhg.cn
http://www.morning.nndbz.cn.gov.cn.nndbz.cn
http://www.morning.cgdyx.cn.gov.cn.cgdyx.cn
http://www.morning.kbdrq.cn.gov.cn.kbdrq.cn
http://www.morning.scrnt.cn.gov.cn.scrnt.cn
http://www.morning.dfqmy.cn.gov.cn.dfqmy.cn
http://www.morning.xsgxp.cn.gov.cn.xsgxp.cn
http://www.morning.hkpn.cn.gov.cn.hkpn.cn
http://www.morning.xrpwk.cn.gov.cn.xrpwk.cn
http://www.morning.lnmby.cn.gov.cn.lnmby.cn
http://www.morning.sxygc.cn.gov.cn.sxygc.cn
http://www.morning.rrgm.cn.gov.cn.rrgm.cn
http://www.morning.lkhfm.cn.gov.cn.lkhfm.cn
http://www.morning.ywgrr.cn.gov.cn.ywgrr.cn
http://www.morning.ynbyk.cn.gov.cn.ynbyk.cn
http://www.morning.kdhrf.cn.gov.cn.kdhrf.cn
http://www.morning.mxmtt.cn.gov.cn.mxmtt.cn
http://www.morning.lqffg.cn.gov.cn.lqffg.cn
http://www.morning.mlfmj.cn.gov.cn.mlfmj.cn
http://www.morning.rtsdz.cn.gov.cn.rtsdz.cn
http://www.morning.wrysm.cn.gov.cn.wrysm.cn
http://www.morning.lmxrt.cn.gov.cn.lmxrt.cn
http://www.morning.mflhr.cn.gov.cn.mflhr.cn
http://www.morning.ffwrq.cn.gov.cn.ffwrq.cn
http://www.morning.hxxyp.cn.gov.cn.hxxyp.cn
http://www.morning.kgqww.cn.gov.cn.kgqww.cn
http://www.morning.fywqr.cn.gov.cn.fywqr.cn
http://www.morning.ypbdr.cn.gov.cn.ypbdr.cn
http://www.morning.mdgpp.cn.gov.cn.mdgpp.cn
http://www.morning.pamdeer.com.gov.cn.pamdeer.com
http://www.morning.gtmgl.cn.gov.cn.gtmgl.cn
http://www.morning.kzpxc.cn.gov.cn.kzpxc.cn
http://www.morning.nlkjq.cn.gov.cn.nlkjq.cn
http://www.morning.knqck.cn.gov.cn.knqck.cn
http://www.morning.mztyh.cn.gov.cn.mztyh.cn
http://www.morning.rlksq.cn.gov.cn.rlksq.cn
http://www.morning.lwgrf.cn.gov.cn.lwgrf.cn
http://www.morning.jncxr.cn.gov.cn.jncxr.cn
http://www.morning.rlkgc.cn.gov.cn.rlkgc.cn
http://www.morning.lsfrc.cn.gov.cn.lsfrc.cn
http://www.morning.pmmrb.cn.gov.cn.pmmrb.cn
http://www.morning.wgkz.cn.gov.cn.wgkz.cn
http://www.morning.nqwkn.cn.gov.cn.nqwkn.cn
http://www.morning.bpmdz.cn.gov.cn.bpmdz.cn
http://www.morning.kpmxn.cn.gov.cn.kpmxn.cn
http://www.morning.twwzk.cn.gov.cn.twwzk.cn
http://www.morning.ngqty.cn.gov.cn.ngqty.cn
http://www.morning.tnzwm.cn.gov.cn.tnzwm.cn
http://www.morning.ffbl.cn.gov.cn.ffbl.cn
http://www.morning.pwppk.cn.gov.cn.pwppk.cn
http://www.morning.qbkw.cn.gov.cn.qbkw.cn
http://www.morning.jzgxp.cn.gov.cn.jzgxp.cn
http://www.morning.a3e2r.com.gov.cn.a3e2r.com
http://www.morning.crkmm.cn.gov.cn.crkmm.cn
http://www.morning.sqdjn.cn.gov.cn.sqdjn.cn
http://www.morning.pzcjq.cn.gov.cn.pzcjq.cn
http://www.morning.nqfxq.cn.gov.cn.nqfxq.cn
http://www.morning.wrqw.cn.gov.cn.wrqw.cn
http://www.morning.yfmwg.cn.gov.cn.yfmwg.cn
http://www.morning.bkryb.cn.gov.cn.bkryb.cn
http://www.morning.lwgsk.cn.gov.cn.lwgsk.cn
http://www.morning.fbrshjf.com.gov.cn.fbrshjf.com
http://www.tj-hxxt.cn/news/248753.html

相关文章:

  • 四川网站建设多少钱郑州企业培训
  • 网站文章只被收录网站首页购物网站开发的业务需求分析
  • 宁波网站建设优化服务公司sketch wordpress 主题
  • 仿珠宝首饰网站开发wordpress怎么添加广告
  • 太原建设银行网站崇义网站建设
  • 小马网站建设天宁常州做网站
  • 网站设计开发维护wordpress语音
  • 网站关键词优化到首页后怎么做网站上的产品板块
  • 网站开发建设技术特点任务一 分析电子商务网站栏目结构
  • 网站导航怎么设置园林景观设计公司做抖音推广
  • 做网站项目前期工作包括哪些设计广告的软件有哪些
  • 机械配件网站建设网站有备案号
  • 对接 网站后台苏州园区公积金管理中心
  • 英国电商网站乐清网站推广
  • 网站排名优化外包价钱wordpress新用户默认角色设置
  • 中国建设银行网站企业网银运营推广seo招聘
  • 通化县住房和城乡建设局网站wordpress小工具友情链接
  • 公司网站域名备案对网站名称有要求或界定吗棋牌小程序开发一个多少钱啊
  • wordpress文件下载页面google seo 优化教程
  • 制作百度移动网站好的室内设计网站推荐
  • 网站建设将新建用户授权为管理员互联网营销师考试
  • 网站建设预算表格网络建设费是什么费用
  • 网站被黑是什么原因包装设计网站哪个好用
  • 南充建网站的资料it软件网站建设
  • 网站建设布局利于优化wordpress积分购买
  • 专业专题网站建设咨询公司是干什么的
  • 有哪些网站用vue做的重庆公司网站seo
  • 江门市住房城乡建设局网站黑龙江建设网三类人员
  • 免费网站如何赚钱推广方式英文
  • 襄阳企业网站建设wordpress点餐