随笔分类 - C#
摘要:创建一个类HttpUitls using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; namespace Wind
阅读全文
摘要:本文简单的介绍一下通过c#语言生成自定义word! 首先我们需要引用一个dll文件 Aspose.Words.dll 这里我已经下载一个比较适用的Aspose.Words.dll 文件了,链接: https://pan.baidu.com/s/1GkxfW0E24a0N-7YPlTdyrQ 提取码:
阅读全文
摘要:winform窗体: winform窗体后台代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using
阅读全文
摘要:一、开发环境 操作系统:Windows 10 X64 开发环境:VS2015 编程语言:C# .NET版本:.NET Framework 4.0 目标平台:X86 二、创建Windows Service 1、新建一个Windows Service,并将项目名称改为“MyWindowsService”
阅读全文
摘要:对TextBox设置输入事件: private void Num_PreviewTextInput(object sender, TextCompositionEventArgs e) { TextBox tb = (TextBox)sender; int count = tb.Text.Lengt
阅读全文
摘要:1 /// <summary> 2 /// 获取ip地址 3 /// </summary> 4 /// <returns></returns> 5 public string GetLocalIP() 6 { 7 try 8 { 9 string HostName = Dns.GetHostName
阅读全文
摘要:使用命令运行python脚本 同样的可以用代码来实现 1 Process p = new Process(); 2 string path = System.Web.HttpContext.Current.Server.MapPath("../Python/0610.py"); ; 3 string
阅读全文
摘要:js代码: $.ajax({ type: "post", url: "AaxClassKPfm.aspx/SaveGCJ",//AaxClassKPfm.aspx为请求页面,SaveGCJ为请求页面方法名 contentType: "application/json; charset=utf-8",
阅读全文
摘要:C# 使用Dev控件为gridView添加复选框,实现多选和单选,代码如下: 1 this.gridControl1.DataSource = dtss; 2 gridView1.OptionsSelection.MultiSelect = true; 3 4 gridView1.OptionsSe
阅读全文
摘要:使用LINQ查询int型数组 static void Main(){ int[] number={2,12,5,15};//数据源 IEnumberable<int> lownums= //定义并存储查询 from n in number where n < 10 select n; foreach
阅读全文
摘要://快速排序递归算法 1 static void Main(string[] args) 2 { 3 int[] arr = { 24,3,5,65,9}; 4 Sort(arr); 5 for (int i = 0; i < arr.Length;i++ ) { 6 Console.WriteLi
阅读全文
摘要:先建立一个IIS网站承载WPF应用程序。 (1)新建一个目录,命名为ISSWPF (2)打开ISS管理器,添加网站 (3)网站建立好以后。在创建得物理路径ISSWPF下创建一个新目录Update001。 打开创建好的VS解决方案,同时设置项目属性。 (1)选择安全性,启用ClickOnce安全设置。
阅读全文
摘要:1 static void Main(string[] args) 2 { 3 //创建二维数组 4 int[] lengths = {2,3}; 5 int[] lowerBounds = { 1, 10 }; 6 Array arr1 = Array.CreateInstance(typeof(
阅读全文


浙公网安备 33010602011771号