随笔- 19
文章- 5
评论- 0
阅读-
5805
07 2022 档案
后台http请求
摘要:HttpResponse response = HttpContext.Current.Response; response.Buffer = true; response.Clear(); response.ClearContent(); response.AddHeader("Content-D
阅读全文
C# core 流、字节、字符串相互转换
摘要:/// <summary> /// 将 Stream 转成 byte[] /// </summary> public byte[] StreamToBytes(Stream stream) { byte[] bytes = new byte[stream.Length]; stream.Read(b
阅读全文
C# core 最简单的方式写入日志
摘要:System.IO.StreamWriter sw = System.IO.File.AppendText( LogPath + LogFielPrefix + "Error-" + DateTime.Now.ToString("yyyy-MM-dd") + ".Log" ); sw.WriteLi
阅读全文
core程序实现文件下载
摘要:已知本地文件名,返回给前台流 string filepath = path +“/” + filename +".txt"; if(System.IO.File.Exists(filepath)) { byte[] bytes; using (Stream stream = new Filestre
阅读全文
element-ui switch
摘要:<el-tooltip :content="'Switch value: ' + value" placement="top"> <el-switch v-model="value" active-color="#13ce66" inactive-color="#ff4949" active-val
阅读全文