
C#
西凉小可
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C# 读取excel到datagridview
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Excel = Microsoft.原创 2012-12-14 14:47:45 · 1630 阅读 · 1 评论 -
非常方便的测试日志输出函数
using System.IO; /// /// 程序测试过程中要输出的数据信息,自动按时间点建立日志文档。 /// /// public void log(string str) { if (File.Exists("D://log") == false) { Directory.CreateDirect原创 2012-12-14 14:48:47 · 520 阅读 · 0 评论 -
连接sql server 2005数据库示例
//摘自《visual studio2005+sql server 2005数据库应用系统开发》 //XP,visual studio2008,sql server 2005 //windows控制台应用程序 using System;using System.Collections.Generic;using System.Linq;using System.Text; //添加usin原创 2012-12-14 14:47:49 · 383 阅读 · 0 评论 -
MDI应用程序开发基本操作 [C# ]
摘自《突破C#编程实例50讲》 刘杨1,设定一个MDI父窗体,作为子窗体的容器,代码: this.IsMDIContainer=true;2,MDI子窗体的生成,代码: Form frmchild=new Form();frmchild.MDIParent=this;frmchild.Show();3,确定激活的MDI子窗体,对子窗体的ActiveForm原创 2012-12-14 14:47:36 · 748 阅读 · 0 评论 -
打印出1至1000的质数
偿试近可能的减少运算次数,提高运算效率。int[] shu = new int[1001]; for (int i = 2; i shu[i-1] = i; int start = 1; //每一次筛选后未确定数的数组储存段的起始位置 int end = 999; //原创 2012-12-14 14:47:23 · 1023 阅读 · 0 评论 -
JSON字符串的在线检测工具网址
http://tools.jb51.net/tools/json/json_editor.htm原创 2012-12-14 14:49:10 · 852 阅读 · 0 评论 -
检测某向量在另一向量的左边还是右边
/// /// 检测某向量在另一向量的左边还是右边。为判断报亭在车行路线的左边还是右边。 /// /// 向量方位角 /// 向量方位角 /// 返回值:0代表与路线重合;1代表右边;2代表左边 private int checkLorR(double car, double pCh) {原创 2012-12-14 14:48:49 · 2698 阅读 · 0 评论 -
[C#][CAD][dxf]提取dxf中指定的数据到TXT文件中
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;/** * XP,VS2008,控制台应用程序 * 对TXT进行读写的简单操作。对CAD的DXF(改成了txt后缀)文件内容按行检索,提取出指定的内容,输出到新的txt文件中 * 功能:遇到一行中有“Ac原创 2012-12-14 14:48:04 · 6006 阅读 · 0 评论 -
c# 远程重启电脑
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Management;//在资源管理器中添加引用System.Management//VS2008,XP,控制台应用程序namespace ConnectionPC{ class Program {原创 2012-12-14 14:47:47 · 531 阅读 · 0 评论 -
c#程序
1.打印出1至1000的质数 2.MDI应用程序开发基本操作 [C# ] 3.C# 读取excel到datagridview 4.c# 远程重启电脑 5.求圆的半径和面积 6.求最大连续子序列之和 立方算法 7.求最大连续子序列之和的平方算法[c#数据结构] 8.求最大连续子序列之和的线性算法 c# 数据结构 9.连接sql server 2005数据库示例 10.[C#][CA原创 2012-12-14 14:49:21 · 475 阅读 · 0 评论 -
计算方位角,度数
/// /// 计算方位角,度数。 /// /// /// /// private double getAzimuth(double dx, double dy) { double Radian; Radian = Math.Atan2(dx, d原创 2012-12-14 14:48:51 · 2492 阅读 · 0 评论 -
做一个小小的记录工作时间的小程序
最近做项目,做得“自由自在”,时间利用的不是很充分。 老师说效率不高,那就这样吧,做个管理时间的小程序,看看一天能工作多长时间,给自己做一个统计。 实现功能:1,开始记录工作时间 2,暂停工作 3,显示一次工作持续时间和当天总工作时间 4,保存所有记录,查看记录原创 2012-12-14 14:48:06 · 2877 阅读 · 0 评论 -
c# 窗体应用程序中解析json格式
1、引用命名空间 System.Web.Script.Serialization(需添加.net引用system.web.extension.dll); 2、定义符合json的树形结构对象。 例如服务器返回的JSON字符串格式如下: { "method":"GetImageFullPathList", "imgPathList":{ "imgPathList":[原创 2012-12-14 14:49:12 · 1186 阅读 · 0 评论