NetBlog主题
2024-09-25 23:18
55
public class FTPHelper{ private static string FTPCONSTR = "ftp://192.168.1.23:21"; private static string FTPUSERNAME = "lqwvje";//FTP服务器的用户名 private static string FTPPASSWORD = "123456";//FTP服务器的密码 /// summary /// 上传文件…
2024-05-22 16:32
343
结果实体类public class ResultModel{ /// summary /// 1:成功 2:失败 /// /summary public int Code { get; set; } public string Msg { get; set; }}Socket客户端类封装public class SocketClient{ Socket socketClient; public stri…
2023-05-28 18:53
1141
/// summary /// 下载 302跳转文件 /// /summary /// param name="parentUrl"父Url/param /// param name="url"302跳转的Url/param /// returns/returns public bool DownFile(string parentUrl,string url) { using (HttpClient client = new …
2023-04-06 11:13
1002
核心代码/// summary/// 银行信息/// /summarypublic class BankInfo{ #region 数组形式存储银行BIN号 /// summary /// 银行 BIN 号 /// /summary private readonly static long[] BankBin = { 102033, 10300…
2022-11-24 22:19
1408
/// summary/// DateTime转时间戳 /// /summary/// param name="dt"DateTime/param/// returns时间戳(秒)/returnspublic static long GetUnixTimeStamp(DateTime dt){ DateTime dtStart = TimeZoneInfo.ConvertTimeFromUtc(new DateTime(1970, 1, 1, …
2022-11-18 10:38
1652
public class HttpHelper{ // Post请求 public string PostResponse(string url, string postData) { try { string result = string.Empty; //设置Http的正文 HttpContent httpContent = new StringContent…
2022-09-19 14:14
2181
private ImageFormat GetImageFormat(FileStream file, out string format){ byte[] sb = new byte[2]; //这次读取的就是直接0-1的位置长度了. file.Read(sb, 0, sb.Length); //根据文件头判断 string strFlag = sb[0].ToString() + sb[1].ToString(); …
2022-06-15 13:45
2403
视频讲解地址 https://www.bilibili.com/video/BV1aU4y1S7rb核心代码/// summary/// 图片转换为ico文件/// /summary/// param name="origin"原图片路径/param/// param name="destination"输出ico文件路径/param/// param name="iconSize"输出ico图标尺寸,…
2022-04-11 07:14
9301
2022-05-26 更新2022-04-27 更新 修复读取CVS文件时 索引超出了数组界限public class CSVHelper{//转载请保留 http://www.luofenming.com//// summary/// 写入CSV/// /summary/// param name="fileName"文件名/param/// param name="dt"要写入的datatable/param…
2019-08-27 11:59
4331
class SessionHelper
{//转载请保留原创地址 http://www.luofenming.com/show.aspx?id=ART2019082700002/// <summary>/// 根据Session名获取Session对象/// </summary>/// <param name="name"></param>/// <returns></returns>…