基本信息
文件名称:课件综合常用类.pptx
文件大小:699.84 KB
总页数:13 页
更新时间:2025-06-08
总字数:约小于1千字
文档摘要
常用类相信一切都有可能
常用类Agenda
万事万物皆对象int-Int32long-Int64delegate-Delegatestring-Stringobject-Object
ObjectObject是所有类的基类装箱与拆箱
PointstructPoint{ publicintX; publicintY; publicPoint(){} publicPoint(intx,inty){this.X=x;this.Y=y;}}
SizeStructSize{ publicintHeight; publicintWidth;}
RectanglestructRectangle{ publicPointPoint;
publicSizeSize; publicRectangle(){} publicRectangle(Pointpoint,Sizesize){this.Point=point;this.Size=size;} publicRectangle(intx,inty,intwidth,intheight):this(newPoint(x,y),newSize(width,height)){}}
RandomNext();10~100的随机数30%的概率67.53%Next(10000)6753
Math
Stringchar的数组LengthIndexOfLastIndexOfSubstringToUperToLower
Demo字数统计;不统计空字符。Char.IsWhiteSpace();查找所有的XX,indexOf数据提取
QandA
ThankU