![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#.net技术贴
文章平均质量分 72
shiweijian1986
这个作者很懒,什么都没留下…
展开
-
c#利用winapi遍历桌面控件算法
public enum GUIInfoType{ guiText. guiTextClass, guiTextParent, guiTextClassParent,} private static int level=0public static int FindGUILike(ref int hWndAr原创 2010-03-18 10:34:00 · 497 阅读 · 0 评论 -
C#利用winapi捕捉鼠标操作控件的句柄
public struct POINTAPI{ public int x; public int y; } public static void GetWindowFromPoint(ref int hwnd,ref StringBuilder winText,ref StringBuilder clsName,ref StringBui原创 2010-03-18 12:31:00 · 843 阅读 · 0 评论 -
C#利用winapi定位控件位置算法
public struct RECT{ public int left; public int Top; public int Right; public int Bottom;} public static bool CenterMouseOn(int hwnd){ int x=0;原创 2010-03-18 12:17:00 · 414 阅读 · 0 评论 -
C# 类型转换全解析
C#中所有的类都继承于OBJECT类类型转换之间存在隐式和显示就是因为类型所占位数不同 bool -> System.Boolean (布尔型,其值为 true 或者 false) char -> System.Char (字符型,占有两个字节,表示 1 个 Unicode 字符) byte -> System.Byte (字节型,占 1 字节,表示 8 位正整数,范围 0 ~原创 2010-04-08 18:59:00 · 364 阅读 · 0 评论 -
C#中栈和堆的区别
一、预备知识—程序的内存分配 一个由C/C++编译的程序占用的内存分为以下几个部分 1、栈区(stack)— 由编译器自动分配释放 ,存放函数的参数值,局部变量的值等。其 操作方式类似于数据结构中的栈。 2、堆区(heap) — 一般由程序员分配释放, 若程序员不释放,程序结束时可能由OS回 收 。注意它与数据结构中的堆是两回事,分配方式倒是类似于链表,呵呵。 3、全局区(静态区)(s转载 2010-04-11 14:34:00 · 1140 阅读 · 1 评论 -
C# 动态操作winform控件算法
private void newusers(string username, string password, string rols) { int j = 0; TextBox txt = new TextBox();//新建textbox控件对象 txt.Width = 80; Point原创 2010-04-07 19:41:00 · 429 阅读 · 0 评论 -
泛型简单介绍
泛型的优势 1、性能 泛型的使用可以避免由于值类型和引用类型转换时候所发生的装箱和拆箱问题 --常用arrarylist使用方法,在object和int类型装换过程中存在装箱和拆箱过程 arrarylist array = new Arraylist() list.add(12);//装箱 int h=(int)list[0];//拆箱 --原创 2010-04-08 20:37:00 · 229 阅读 · 0 评论 -
泛型类继承全解析
泛型类之间的继承 普通的继承规则,包括成员的隐藏、重载和访问限制等,原则上也都适用于泛型类之间的继承。但由于泛型类是抽象的而非具体的数据类型,所以泛型类的继承问题是一个既有趣又容易产生混淆的问题。因为基类和派生类可能只有一个是泛型类,也可能二者都是,本节将分别对这3种情况进行详细说明。为了解说上的方便,首先需要引入开放类型和封闭类型的概念。 开放类型与封闭类型 在引入了泛型的概念之后,C转载 2010-04-08 21:24:00 · 2127 阅读 · 0 评论