文章分类 -  C#

摘要:C# Version 3.0 Specification September 2005 Notice © 2005 Microsoft Corporation. All rights reserved. Microsoft, Windows, Visual Basic, Visual C#, and Visual C++ are either registered trademarks or... 阅读全文
posted @ 2007-09-07 09:29 曹立松 阅读(831) 评论(0) 推荐(0) 编辑
摘要:第一种方法:打开vs.net新建一个控制台项目。然后在Main()方法下输入下面的程序。 string s="abcdeabcdeabcde"; string[] sArray=s.Split('c'); foreach(string i in sArray) Console.WriteLine(i.ToString()); 输出下面的结果:ab deab de... 阅读全文
posted @ 2007-09-04 23:34 曹立松 阅读(185) 评论(0) 推荐(0) 编辑
摘要:通过.Net Framework提供的Help类来完成CHM帮助文件的调用,Namespace: System.Windows.Forms。 若要为应用程序提供帮助,调用Help类 ShowHelp 和 ShowHelpIndex 静态方法。 For example: 1. 显示指定 URL 处的帮助文件内容。 string helpfile = “helpfile.chm... 阅读全文
posted @ 2007-09-04 23:33 曹立松 阅读(617) 评论(0) 推荐(0) 编辑
摘要:1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 in... 阅读全文
posted @ 2007-09-04 23:32 曹立松 阅读(194) 评论(0) 推荐(0) 编辑
摘要:Developer Express控件组合中的GridControl控件,如何自动显示每一行的序号 Developer Express控件组合中的GridControl控件,如何自动显示每一行的序号? 比方说有10条数据记录, 我要在记录旁边显示1.2.3.4.这样的数字. 但是,如果更改了数据记录的显示方式,升序或者降序都不影响数字的变化. 怎么做? 在GridView的... 阅读全文
posted @ 2007-09-04 23:31 曹立松 阅读(1552) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Text; using DevExpress.XtraGrid.Localization; using DevExpress.XtraBars.Localization; using DevExpress.XtraCharts.Localization; using DevEx... 阅读全文
posted @ 2007-09-04 23:30 曹立松 阅读(404) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Windows.Forms; using DevExpress.XtraPrinting; using System.Xml.Serialization; namespace MyDevExpressDemo { /// /// PrintSettingController 的摘要说明。 /// public class Print... 阅读全文
posted @ 2007-09-04 23:26 曹立松 阅读(1474) 评论(0) 推荐(0) 编辑
摘要:如何在处理DevExpress部件的所有可打印部件如(gridControl,TreeList)这些控件在打印时能加上标题。 查看帮助发觉需要使用DevExpress.XtraPrinting.PrintableComponentLink此对象来实现。也就是说不能使用gridControl控件的print()方法。 在DevExpress.XtraPrinting名称空间下,可以找到PageH... 阅读全文
posted @ 2007-09-04 23:26 曹立松 阅读(658) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2007-09-04 23:25 曹立松 阅读(14) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2007-09-04 23:23 曹立松 阅读(8) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。
posted @ 2007-09-04 23:19 曹立松 阅读(7) 评论(0) 推荐(0) 编辑
摘要:SQLDMO(SQL Distributed Management Objects,SQL分布式管理对象)封装了Microsoft SQL Server数据库中的对象。SQLDMO是Microsoft SQL Server中企业管理器所使用的应用程序接口,所以它可以执行很多功能,其中当然也包括对数据库的备份和恢复。 SQLDMO由Microsoft SQL Server自带的SQL... 阅读全文
posted @ 2007-09-04 23:17 曹立松 阅读(217) 评论(0) 推荐(0) 编辑
摘要:一、路径相关操作 问题1:如何判定一个给定的路径是否有效/合法; 解决方案:通过Path.GetInvalidPathChars或Path.GetInvalidFileNameChars方法获得非法的路径/文件名字符,可以 根据它来判断路径中是否包含非法字符; 问题2:如何确定一个路径字符串是表示目录还是文件; 解决方案: 1、使用Director... 阅读全文
posted @ 2007-09-04 23:16 曹立松 阅读(272) 评论(0) 推荐(0) 编辑
摘要:使用ADO.NET时,每次数据库操作都要设置connection属性、建立connection、使用command、事务处理等,比较繁琐,有很多重复工作。能不能把这些繁琐的、常用的操作再封装一下,以更方便、安全地使用。 using System; using System.Data.SqlClient; using System.Text; using System.Data; using... 阅读全文
posted @ 2007-09-04 23:13 曹立松 阅读(339) 评论(0) 推荐(0) 编辑