
c#
金秋送爽
头破血流一步难
势如破竹马平川
忆得往昔凌云志
待到跟前高似天
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c# 打开文件 Dialog
using System; using System.Windows.Forms; class MainClass { static void Main(string[] args) { OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == DialogRe...2009-09-24 23:10:38 · 159 阅读 · 0 评论 -
Piccolo.NET
图元处理 可实现 visio 功能2009-08-11 18:11:27 · 96 阅读 · 0 评论 -
c#怪异的Lambda 语法
Lambda Syntax 其实完全可以看成一种方法 [param list] => expression method(param list){ expression } 看上去是很像 [code="c#"] List lastNames = new List { “Einstein”, “Gore”, “Mayo” }; var famousPeopl...2009-07-29 16:07:40 · 121 阅读 · 0 评论 -
c# 泛型和索引
[code="c#"] class YList { private T[] _list; public YList(T[] ts){ _list = ts; } public YList() { _list = new T[5]; } ...2009-07-29 14:43:28 · 156 阅读 · 0 评论 -
c#反射
[code="c#"] void DynamicallyInvokeMembers(Assembly myAssembly) { Type classType = myAssembly.GetType(“Reflected”); PropertyInfo myProperty = classType.GetProperty(“MyProperty”); MethodInfo propG...原创 2009-07-29 11:36:45 · 104 阅读 · 0 评论 -
安装 启动 停止 卸载 windwos 服务
一些东西简单也会忘,就记下来吧 安装 installutil XXX.exe 启动 net start XXX 停止 net stop XXX 卸载 installutil XXX.exe 当然这些都是命令行操作的2009-07-29 09:35:30 · 108 阅读 · 0 评论 -
c# 确认框实现
[code="c#"] private void button3_Click(object sender, System.EventArgs e) { if (MessageBox.Show("真的删除?","确认删除", MessageBoxButtons.YesNo) == DialogResult.Yes) { // code here } }...2009-07-20 11:39:15 · 246 阅读 · 0 评论 -
C# 文件隐藏处理
读取属性 [code="c#"] FileInfo fi = new FileInfo("C:\\test.txt"); if ((fi.Attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)//read only if ((fi.Attributes & FileAttributes.Hidden) == F...2009-07-20 10:29:04 · 401 阅读 · 0 评论 -
C# 接口
[modifiers] interface IName [: Interface [, Interfaces]] { // methods // properties // indexers // events } 看看C# 几口的定义 比起java 的却是要麻烦些 不过概念还是一样的 C# 构造函数重载 [code="C#"] public class We...2009-07-15 11:27:55 · 97 阅读 · 0 评论 -
C# ADO.net
//仅仅记录原理方便查阅 代码质量较次 先得到connection 调用command 使用 reader 或者别的读取数据 //该处使用的是mysql [code="java"] static void Main(string[] args) { String source = "DRIVER={MySQL ODBC 3.51 Dri...2009-07-10 09:49:17 · 105 阅读 · 0 评论 -
C# bisic
操作符重载 一定为public static oprator 。。(。。) c# 中类名和变量名是可以相同的 vs 代码补全的快捷键为 ctrl + j 习惯了eclipse 下的alt + / 还有些不习惯vs 属性 可以定义为 public int price{set ; get;} C# 中的单例模式 竟然 只是 在类前加一个 static 两个...2009-07-06 10:25:09 · 123 阅读 · 0 评论 -
为Lable 添加 tooltip
private void InitializeComponent() { this.firstLabel = new System.Windows.Forms.Label(); this.secondLabel = new System.Windows.Forms.Label(); this.labelsToolTip = new System.W...原创 2009-10-03 19:37:14 · 618 阅读 · 0 评论 -
webBrowser invoke js
function Test(d) { alert(d); } 你可以这么调用它: webBrowserCtrl.Document.InvokeScript("Test", new object[] { "ABCD" });原创 2009-09-08 12:53:42 · 151 阅读 · 0 评论