2020年3月26日

c# 获取当前活动窗口句柄,获取窗口大小及位置

摘要: 需调用API函数 需在开头引入命名空间 using System.Runtime.InteropServices; 获取当前窗口句柄:GetForegroundWindow() [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpellin 阅读全文

posted @ 2020-03-26 17:11 jack_Meng 阅读(24054) 评论(1) 推荐(6)

c# 数组间相互转换 int[] string[] object[]

摘要: ee //字符串数组(源数组) string[] sNums = new[] {"1", "2"}; //整型数组(目标数组) int[] iNums; //转换方法 iNums = Array.ConvertAll<string, int>(sNums , s => int.Parse(s)); 阅读全文

posted @ 2020-03-26 10:57 jack_Meng 阅读(4774) 评论(0) 推荐(0)

导航