C#
十月兔
须脚踏实地,认真执着做事
展开
-
C# 求多维数组各维的长度/元素个数
byte[][] testArr = new byte[][]{};求testArr的行数:testArr.GetLength(1);求testArr的列数:testArr.GetLength(0);多维数组依次类推。Rank返回数组的维数,例如二维数组,Rank返回值总为2;GetLength(i)返回第i维的长度;Length返回数组所有元素的个数;原创 2011-06-01 10:30:00 · 3892 阅读 · 0 评论 -
An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll
写了个程序,结果在form关闭的时候出现错误提示: An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll 中断后一直定位到this.close(); 因为form中有定时什么的,所以去网上查了一天的堆栈溢出相关的死循环,线程什么的,最后让别人帮我看,才发现错误原因, 原来是我在form_formclosed()中又调用了this.close(),自己调原创 2011-04-15 15:38:00 · 2895 阅读 · 1 评论 -
百度地图BMap无法添加文字标注(textmarker)
刚学java script,需要做一个将百度地图嵌入到WIinform中的东西,做地图的时候遇到了个问题,就是没办法在地图上加文字标注(像百度地图一样,点一下地图出来个文本标记),折腾了好久,终于找到原因: 正确的写法是 function addTextMarker(_原创 2011-09-21 16:52:04 · 4631 阅读 · 0 评论 -
东拼西凑出来的可编辑、背景色可变的自定义ListView控件
控件功能: 1、列表头颜色可变 2、列表线颜色可变 3、列表行背景色交替变化 4、行选中色可调 5、单元格双击可编辑(第一列处存在bug) 大致效果 代码如下: using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using原创 2012-02-15 15:42:34 · 800 阅读 · 0 评论