C# WinForm获取当前路径汇总
Winform获取应用程序的当前路径的方法集合,具体如下,值得收藏//获取当前进程的完整路径,包含文件名(进程名)。string str = this.GetType().Assembly.Location;result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名)//获取新的Process 组件并将其与当前活动的进程关联的主模块的完整 …… 阅读全文
Winform获取应用程序的当前路径的方法集合,具体如下,值得收藏//获取当前进程的完整路径,包含文件名(进程名)。string str = this.GetType().Assembly.Location;result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名)//获取新的Process 组件并将其与当前活动的进程关联的主模块的完整 …… 阅读全文
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 System.Thr …… 阅读全文
using System;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;namespace socket2016{ class Program { static void Main(string[] args) { …… 阅读全文
/// /// Winform程序退出删除运行目录 FormClosed调用 /// private void DeletExeFile() { string fileName = @"C:\remove.bat"; StreamWriter bat = new StreamWrit …… 阅读全文
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.W …… 阅读全文
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Linq;using System.Net;using System.Net …… 阅读全文
using System;using System.Collections.Generic;using System.ComponentModel.DataAnnotations;using System.Linq;using System.Web;namespace ProductStore.Models{ //商品实体类 public class Product …… 阅读全文
using System.IO;/// /// WebApi返回图片/// public HttpResponseMessage GetQrCode(){ var imgPath = @"D:\ITdosCom\Images\itdos.jpg"; //从图片中读取byte var imgByte = File.ReadAllBytes(imgPath); …… 阅读全文