zlb

随笔分类 -  C#

.Net中使用com组件后发生System.ArithmeticException异常的解决办法(Message=算术运算中发生溢出或下溢。)
摘要:C#,System.ArithmeticExceptionMessage,算术运算中发生溢出或下溢 阅读全文

posted @ 2016-06-02 17:58 zlb 阅读(1943) 评论(1) 推荐(1) 编辑

未能加载文件或程序集“DeveloperKit10.1/DotNet/ESRI.ArcGIS.ADF.Local.或它的某一个依赖项
摘要:使用VS2010进行ArcGIS Engine 10.1进行开发过程中,出现:错误 1 未能加载文件或程序集“file:///D:/ArcGIS/DeveloperKit10.0/DotNet/ESRI.ArcGIS.3DAnalyst.dll”或它的某一个依赖项。试图加载格式不正确的程序。 行 1... 阅读全文

posted @ 2014-09-11 11:14 zlb 阅读(773) 评论(0) 推荐(0) 编辑

使用WebClient Post方式模拟上传文件和数据
摘要:假如某网站有个表单,例如(url: http://localhost/login.aspx):帐号 密码 我们需要在程序中提交数据到这个表单,对于这种表单,我们可以使用 WebClient.UploadData 方法来实现,将所要上传的数据拼成字符即可,程序很简单string uriString =... 阅读全文

posted @ 2014-09-04 09:22 zlb 阅读(1019) 评论(0) 推荐(0) 编辑

C# IList<T>转为DataTable
摘要:public class WebUtil{/// /// 转换IList为DataTable/// /// 泛型类型 /// 泛型List集合 /// Datatable 对象public static DataTable ConvertToDataTable(IList list) {DataTable table = CreateTable();Type entityType = typeof(T);PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(entityType);foreach (T .. 阅读全文

posted @ 2013-11-12 15:35 zlb 阅读(628) 评论(0) 推荐(0) 编辑

Power Point已经检测到你的显卡可能无法正确配置
摘要:Microsoft PowerPoint打开ppt时提示信息PowerPoint已检测到你的显卡可能无法正确配置最佳的幻灯片播放体验(“Power Point has detected that your graphics card may not be configured properly for optimal slide show experience“)通常情况下,在PowerPoint中的幻灯片将起用硬件图形加速功能,提供了很多很好的图形卡在市场上。这将有助于使运动的图形,如过渡,动画,视频,使动画更顺畅。如果你得到上面的错误或通知消息,那么它可能是由于你有很多动画在PowerPo 阅读全文

posted @ 2013-08-27 09:53 zlb 阅读(14483) 评论(0) 推荐(0) 编辑

vs2012 断点不能调试
摘要:调试ASP.NET时发现,设置的断点被视而不见提示错误debugging information for ‘iisexpress.exe’cannot be found or does not match.cannot find or open then pdb file我的解决办法 删除 bin目录和 obj目录重新调试 一切正常 阅读全文

posted @ 2013-08-25 17:04 zlb 阅读(838) 评论(0) 推荐(0) 编辑

常用正则表达式
摘要:只能输入数字:”^[0-9]*$”。只能输入n位的数字:”^\d{n}$”。只能输入至少n位的数字:”^\d{n,}$”。只能输入m~n位的数字:。”^\d{m,n}$”只能输入零和非零开头的数字:”^(0|[1-9][0-9]*)$”。只能输入有两位小数的正实数:”^[0-9]+(.[0-9]{2})?$”。只能输入有1~3位小数的正实数:”^[0-9]+(.[0-9]{1,3})?$”。只能输入非零的正整数:”^\+?[1-9][0-9]*$”。只能输入非零的负整数:”^\-[1-9][]0-9″*$。只能输入长度为3的字符:”^.{3}$”。只能输入由26个英文字母组成的字符串:”^[A 阅读全文

posted @ 2012-08-06 18:56 zlb 阅读(308) 评论(0) 推荐(0) 编辑

xml to linq C#实例 类和xml文件互转换
摘要:xml文件 <?xml version="1.0" encoding="utf-8" ?><User> <UserID>34e4257b-b364-4ddc-979d-bcfbb5288f5a</UserID> <Films> <Film> <Title>蜘蛛侠</Title> <ID>30</ID> </Film> <Film> <Title>... 阅读全文

posted @ 2012-04-27 15:59 zlb 阅读(1734) 评论(0) 推荐(0) 编辑

图片转成byte数组
摘要:winform中PictureBox 中的 用方法System.Drawing.Image.Save 报错误 A generic error occurred in GDI+. 解决办法 private byte[] ImageToByte(PictureBox pb) { //Image image =(Image) pb.Image.Clone(); ... 阅读全文

posted @ 2012-03-02 14:48 zlb 阅读(1492) 评论(0) 推荐(0) 编辑

C#使用xml文档作为数据源 Name cannot begin with the ' ' character, hexadecimal value 0x20
摘要:程序中使用xml文件作为数据源,出现错误 Name cannot begin with the ' ' character, hexadecimal value 0x20 是因为xml文件中 出现 特殊字符 &lt; LineBreak/ &gt; 在中间有空格 所以出现上面的错误,改正方法为 &lt;LineBreak/&gt; 在xml文档中 &lt; 标识"<" &gt; 标识 为 “>” 阅读全文

posted @ 2011-05-13 18:03 zlb 阅读(2211) 评论(0) 推荐(0) 编辑

c# 使用数据生成xml文件
摘要:Create XML document from object list using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.Linq;using System.Reflection;using Sys... 阅读全文

posted @ 2011-05-08 17:37 zlb 阅读(950) 评论(0) 推荐(0) 编辑

在程序中动态生成实体类
摘要:[代码][代码]在silverlight的datagrid中绑定//////////////////////////////////////例子 在windows中[代码]测试通过Tuesday, August 04, 200915:12:00 阅读全文

posted @ 2009-08-04 15:13 zlb 阅读(758) 评论(0) 推荐(0) 编辑

两个表合并成一个表
摘要://两个结构一样的DT合并DataTable DataTable1 = new DataTable();DataTable DataTable2 = new DataTable();DataTable newDataTable = DataTable1.Clone();object[] obj = new object[newDataTable.Columns.Count];for (int i ... 阅读全文

posted @ 2009-07-31 10:49 zlb 阅读(1018) 评论(0) 推荐(0) 编辑

导航

统计

点击右上角即可分享
微信分享提示