随笔分类 -  C#

摘要:解决方法如下: 方法一、找到以下路径文件:C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config 将下面这段配置文件加入<configSections>节点下。 <configSections> <section nam 阅读全文
posted @ 2021-08-10 09:10 贺俊峰 阅读(835) 评论(0) 推荐(0)
摘要:一)、vs2019 连接oracle 报OCIEnvCreate failed with return code 1 but error message text was not available 异常, 解决方法:tools-->projects and solutions-->web proj 阅读全文
posted @ 2021-08-09 11:30 贺俊峰 阅读(207) 评论(0) 推荐(0)
摘要:c#中的Process类可方便的调用外部程序,所以我们可以通过调用cmd.exe程序加入参数 "/c " + 要执行的命令来执行一个dos命令(/c代表执行参数指定的命令后关闭cmd.exe /k参数则不关闭cmd.exe)Process p = new Process(); p.StartInfo.FileName = "cmd.exe"; p.StartInfo.Arguments = "/k shutdown -a"; p.StartInfo.UseShellExecute = false; p.StartInfo.Redire 阅读全文
posted @ 2012-07-03 15:06 贺俊峰 阅读(331) 评论(0) 推荐(0)
摘要:/// <summary> /// 自定义List /// </summary> /// <typeparam name="T">列表中元素的类型</typeparam> class MyList<T> : IEnumerable { T[] t = new T[0]; public MyList() { } public MyList(int capacity) { this.Capacity = capacity; } int count = 0; /// <summary> /// MyList& 阅读全文
posted @ 2011-07-28 20:06 贺俊峰 阅读(588) 评论(0) 推荐(0)