随笔分类 -  C#

摘要://构造DataTable DataTable dt=new DataTable("demo"); dt.Columns.Add("pkid",typeof(System.Int32)).Caption="序号"; dt.Columns.Add("user_name", typeof(System.String)).Caption="用户名"; dt.Columns.Add("passwd",typeof(System.String)).Caption="密码&qu 阅读全文
posted @ 2013-05-23 14:19 婴年早肥 阅读(563) 评论(0) 推荐(0)
摘要:namespace Project1{ using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; //连接CE设备 public class RAPIInit { public void RapiInit() { int ret = CeR... 阅读全文
posted @ 2013-05-23 14:18 婴年早肥 阅读(535) 评论(0) 推荐(0)
摘要:/// <summary> /// 转换数字金额主函数(包括小数) /// </summary> /// <param name="str">数字字符串</param> /// <returns>转换成中文大写后的字符串或者出错信息提示字符串</returns> public string ConvertSum(string str) { if (!IsPositveDecimal(str)) return "格式错误!"; if (Double.Parse(str) > 99 阅读全文
posted @ 2013-05-23 13:54 婴年早肥 阅读(393) 评论(0) 推荐(0)
摘要:获取PC上的绝对路径string appPath =Application.StartupPath;//获取路径INIFile ini = new INIFile(appPath + @"\config.ini");获取移动设备开发中的绝对路径string appPath =System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);//获取路径INIFile ini = new INIFile(appPath + @"\ 阅读全文
posted @ 2013-05-23 13:51 婴年早肥 阅读(160) 评论(0) 推荐(0)