随笔分类 -  C#

C#结课报告
摘要:Revision HistoryDateIssueDescriptionAuthor18/May/2015v1.0Initial creation岳远志To-do-list1.object简单的Todolist,可以新建或打开任务列表,更改任务列表名称,查看任务内容并修改,新建或删除任务2.scop... 阅读全文

posted @ 2015-05-26 00:11 wos1239 阅读(281) 评论(0) 推荐(0) 编辑

C#三个平台上的文件选择方法
摘要:wpf:Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();dlg.DefaultExt = ".txt";Nullable result = dlg.ShowDialog();if (result ==... 阅读全文

posted @ 2015-05-25 12:56 wos1239 阅读(204) 评论(0) 推荐(0) 编辑

C#线程
摘要:线程(Thread)是进程中一个单一的顺序控制流程。线程是进程中的实体。一个进程可以有多个线程,一个线程必须有一个父进程。线程一般具有read,blocking和operation三种基本状态。由三种基本状态,衍化出五种线程的基本操作。首先,derive,线程是在进程内派生出来的。其次,schedu... 阅读全文

posted @ 2015-05-11 12:39 wos1239 阅读(159) 评论(0) 推荐(0) 编辑

C# Linq
摘要:linq可以对多种数据源和对象进行查询,可以减少代码量,提高检索效率。感觉linq很像sql。。,但是语句的顺序不同linq的查询形式如下: from... select... where...例如查询偶数:using System;using System.Collections.Gener... 阅读全文

posted @ 2015-04-29 12:45 wos1239 阅读(142) 评论(0) 推荐(0) 编辑

C# string的一些函数
摘要:创建string: string (char[]) 使用指定的字符串数组构建一个新的string对象 Copy(string) 使用指定的string构建一个新的string对象 比较函数: Compare(a,b) 和a.CompareTo(b) 相等返回0,大于返回正数,小于返回负数; ... 阅读全文

posted @ 2015-04-20 23:50 wos1239 阅读(233) 评论(0) 推荐(0) 编辑

C#调用进程
摘要:Process process = new Process(); process.StartInfo.FileName = "123.exe"; process.StartInfo.UseShellExecute = false; // 是否使用外壳程... 阅读全文

posted @ 2015-04-08 00:04 wos1239 阅读(339) 评论(1) 推荐(0) 编辑

C#属性和readonly类型
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication3{ class... 阅读全文

posted @ 2015-03-31 23:12 wos1239 阅读(432) 评论(0) 推荐(0) 编辑

C#传值
摘要:C#若不加限制传值时自带的类型为值传递,自创的类型为引用传递using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace... 阅读全文

posted @ 2015-03-31 22:48 wos1239 阅读(123) 评论(0) 推荐(0) 编辑

C#static
摘要:只能用类名调用静态成员(用"类名.???")using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Console... 阅读全文

posted @ 2015-03-31 22:05 wos1239 阅读(266) 评论(0) 推荐(0) 编辑

C#this的五种用法
摘要:this的五种用法:1.使用被掩盖的成员变量:classAA{inta;publicvoidset1(inta){this.a=a;//right}publicvoidset2(inta){a=a;//会有警告:“对同一变量进行赋值;是否希望对其他变量赋值?”;}}2.把这个对象传给其他函数usin... 阅读全文

posted @ 2015-03-31 21:17 wos1239 阅读(197) 评论(0) 推荐(0) 编辑

C#class
摘要:面向对象的三大特性: 封装、继承、多态(Encapsulation、Polymorphism、Inheritance);C#class中的五种访问权限: public 可在这个程序集(命名空间)和引用他的其他命名空间使用 private protected internal 和publ... 阅读全文

posted @ 2015-03-31 19:54 wos1239 阅读(171) 评论(0) 推荐(0) 编辑

C#预处理指令
摘要:#define#undef#if#else#elif(else if 的简写)#endif定义和不定义(#define、#undef)必须加在最开头#define abc (要在所有非预处理指令的前面,包括命名空间)using System;using System.Collections.Gene... 阅读全文

posted @ 2015-03-23 13:19 wos1239 阅读(112) 评论(0) 推荐(0) 编辑

C#基本语句与C++区别
摘要:条件语句必须为bool表达式int a = 1;if(a){ ...}在c++中可以,但c#报错但bool b = true;//不能写成b = 1了;if(b){ ...}是可以的,因为b本来就是bool型的switch 语句: 一个case语句如果非空,则必须用break或goto语句,即... 阅读全文

posted @ 2015-03-23 12:49 wos1239 阅读(120) 评论(0) 推荐(0) 编辑

C#枚举类型
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication1{ class ... 阅读全文

posted @ 2015-03-23 11:55 wos1239 阅读(84) 评论(0) 推荐(0) 编辑

C#基本数据类型与C++区别
摘要:与C++不同的地方:char占两个字节存Unicode字符,long long 改为 long ;unsize ... 改为 u...新增: byte占1个字节,类似与C++char, sbyte有符号的byte decimal 占16个字节,定点小数,28-29位有效数字和小数点位置,精度高... 阅读全文

posted @ 2015-03-23 11:49 wos1239 阅读(173) 评论(1) 推荐(0) 编辑

C#调试
摘要:选择Debug模式F9设置断点//运行这一句之前停,然后再运行这一句F5运行F10逐过程执行F11逐语句执行//调用系统的函数还是会逐过程执行,无法进入函数内。在调试过程中可以通过局部变量窗口或用鼠标指向变量查看变量的值调试菜单最后一栏属性打开后选调试栏,在命令行参数中输入数据可以给args[]传值... 阅读全文

posted @ 2015-03-23 11:11 wos1239 阅读(168) 评论(0) 推荐(0) 编辑

C#holle world
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication1{ class ... 阅读全文

posted @ 2015-03-23 10:31 wos1239 阅读(149) 评论(0) 推荐(0) 编辑

导航