随笔分类 -  C#

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页

摘要:实现效果: 知识运用: Graphics类的DrawString方法 public void DrawString (string s, Font font, Brush brush,float x flloat y) //在指定位置且用指定的Brush和Font对象绘制指定的文本字符串 实现代码: 阅读全文

posted @ 2019-01-11 22:49 努力成长静待花开 阅读(177) 评论(0) 推荐(0)

摘要:实现效果 知识运用: Graphics类的DrawPolygon (Pen pen,Point[] points) //绘制由一组Point结构定义的多边形 实现代码: 阅读全文

posted @ 2019-01-11 22:23 努力成长静待花开 阅读(201) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Graphics类中的DrawPie方法 public void DrawPie (Pen pen,Rectangle rectangle, startAngle, float sweepAngle) public void DrawPie (Pen pen, int x,i 阅读全文

posted @ 2019-01-11 22:04 努力成长静待花开 阅读(388) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Graphics类的DrawArc方法 public void DrawArc (Pen pen,Rectangle rect,float startAngle, float sweepAngle) //由Rectangle结构指定的椭圆的一部分 public void Dr 阅读全文

posted @ 2019-01-11 21:24 努力成长静待花开 阅读(191) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Graphics类中的DrawEllipse方法 public void DrawEllipse (Pen pen,Rectangle rect) //绘制边界由Rectangle结构指定的椭圆 public void DrewEllipse (Pen pen ,int x 阅读全文

posted @ 2019-01-11 20:41 努力成长静待花开 阅读(288) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Graphics类的DrawRectangle方法 public void DrawRectangle (Pen pen,Rectangel rect) //绘制由Rectangle结构指定的矩形 public void DrawRectangle (Pen pen,int 阅读全文

posted @ 2019-01-11 20:21 努力成长静待花开 阅读(237) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Graphics类中的DrawLine方法 其常用重载 public void DrawLine (Pen pen, Point pt1,Point pt2) //绘制一条连接两个Point结构的线 public void DrawLine (Pen pen,int x, i 阅读全文

posted @ 2019-01-11 18:24 努力成长静待花开 阅读(300) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: StramWrite类的构造方法和Write方法 实现代码: 阅读全文

posted @ 2019-01-11 02:33 努力成长静待花开 阅读(633) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: StreamReader类的构造 和ReadToEnd方法 public StreamReader (string path, Encoding encoding ) 实现代码: 阅读全文

posted @ 2019-01-11 02:04 努力成长静待花开 阅读(260) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: StreamReader类的ReadLine方法 实现代码: 阅读全文

posted @ 2019-01-11 01:42 努力成长静待花开 阅读(270) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: StreamReader类的ReadLine方法 //从当前流中读取一行字符并将数据作为字符串返回 public override string ReadLine () 实现代码: 阅读全文

posted @ 2019-01-11 01:19 努力成长静待花开 阅读(1726) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: File类的OpenWrite方法 //实现打开现有文件以进行写入 public static FileStream OpenWrite (string path) Encoding抽象类的GetBytes方法 //将指定的字符串中的所有字符编码为一个字节序列 public 阅读全文

posted @ 2019-01-11 00:59 努力成长静待花开 阅读(1744) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: File类的OpenRead方法 //实现打开现有文件以进行读取 public static FileStream OpenRead(string path) FileStream类的Read方法 //实现从流中读取字节块并将该数据写入给定的缓冲区 public overri 阅读全文

posted @ 2019-01-10 22:47 努力成长静待花开 阅读(4461) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: File类的CreateText方法 StreamWriter类的WriteLine方法 实现代码: 阅读全文

posted @ 2019-01-10 22:01 努力成长静待花开 阅读(781) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: File类的CreateText方法 //创建或打开一个文件用于写入UTF-8编码的文本 public static StreamWriter CreateText (string path) //f返回一个StreamWriter对象 它使用UTF-8编码写入指定文件 St 阅读全文

posted @ 2019-01-10 13:11 努力成长静待花开 阅读(190) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: DirectoryInfo类的GetFiles方法 //返回当前文件夹的文件列表 public FileInfo[] GetFiles() Directory类的CreateDirectory方法 //在指定路径中创建文件夹 public static DirectoryIn 阅读全文

posted @ 2019-01-09 21:13 努力成长静待花开 阅读(601) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Directory类的GetParent方法 //检索指定路径的付文件夹 包括绝对路径和相对路径 public static DirectoryInfo GetParent (string path) 实现代码: 阅读全文

posted @ 2019-01-09 19:50 努力成长静待花开 阅读(712) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: Directory类的GetLogicalDrives方法 //检索计算机上的逻辑分区 public static string[] GetLogicalDrives() GetDirectories方法 和GetFiles方法 实现代码: 阅读全文

posted @ 2019-01-09 19:09 努力成长静待花开 阅读(373) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: DirectoryInfo类的Delete方法 public override voie Delete() //文件夹非空会报错 public void Delete (bool recursive) //是否递归删除 实现代码: 阅读全文

posted @ 2019-01-08 22:14 努力成长静待花开 阅读(123) 评论(0) 推荐(0)

摘要:实现效果: 知识运用: DirectoryInfo类的MoveTo方法 public void MoveTo (string destDirName) 实现代码: 阅读全文

posted @ 2019-01-08 13:32 努力成长静待花开 阅读(142) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页