常用方法
luckyone906
这个作者很懒,什么都没留下…
展开
-
配置文件的方式总结
1.xml文件存储配置信息,属性中可设置输出到应用程序输出路径拷贝,程序中读写使用,程序修改只需修改xml文件然后覆盖到输出路径中。2.AppConfig文件存储,可设置属性输出路径,程序修改只需重新覆盖debug下的.exe.config文件。原创 2016-11-10 18:26:03 · 297 阅读 · 0 评论 -
C# 获取主机IP地址
public static string GetIP() { string strAddr = ""; try { string strHostName = System.Net.Dns.GetHostName(); System.Ne转载 2016-11-10 10:40:20 · 643 阅读 · 0 评论 -
总结以下三种方法,实现c#每隔一段时间执行代码:
总结以下三种方法,实现c#每隔一段时间执行代码:方法一:调用线程执行方法,在方法中实现死循环,每个循环Sleep设定时间;方法二:使用System.Timers.Timer类;方法三:使用System.Threading.Timer;1234567891011转载 2016-03-13 10:10:41 · 13301 阅读 · 1 评论 -
System.Windows.Forms.Timer与System.Timers.Timer的区别
.NET Framework里面提供了三种Timer:System.Windows.Forms.TimerSystem.Timers.TimerSystem.Threading.TimerVS.NET 2005默认只有一个Timer控件,但那是System.Forms.Timer控件.如果要使用System.Timers.Timer的控件,需要在工具箱上单击转载 2017-02-07 16:55:35 · 1464 阅读 · 0 评论 -
c++中scanf和printf
scanf函数一般格式是: scanf(格式控制, 输出表列)printf函数的一般格式是 printf(格式控制,输出表列)【例3.4】用scanf和printf函数进行输入和输出。#include using namespace std;int main( ){ int a; float b; char c; scanf("%d %原创 2017-04-12 16:23:19 · 8604 阅读 · 0 评论 -
安装包,创建快捷方式,开机启动项,配置文件参数覆盖窗体类库
//using IWshRuntimeLibrary;using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;using System.Text;...转载 2018-12-10 11:18:31 · 427 阅读 · 0 评论