随笔分类 - C#
摘要:一、TransactionScope 环境事务 二、嵌套事务 事务完成代码 你可能不知道这一点,在 .NET Framework 4.5.0 版本中包含有一个关于 System.Transactions.TransactionScope 在与 async/await 一起工作时会产生的一个严重的 b
阅读全文
摘要:class 1 //student 2 [Serializable] 3 public class Student 4 { 5 public string FirstName { get; set; } 6 public string LastName { get; set; } 7 public
阅读全文
摘要:读取文件 File.ReadAllText(textBox1.Text,Encoding.ASCII); Form 1 namespace ReadWriteText 2 { 3 public partial class Form1 : Form 4 { 5 private readonly Ope
阅读全文
摘要:Form 1 namespace FileProperties 2 { 3 public partial class Form1 : Form 4 { 5 private string currentFolderPath; 6 7 public Form1() 8 { 9 InitializeCom
阅读全文
摘要:一、标识和Principal 1 static void Main(string[] args) 2 { 3 AppDomain.CurrentDomain.SetPrincipalPolicy(System.Security.Principal.PrincipalPolicy.WindowsPri
阅读全文
摘要:DataTable dt = new DataTable(); dt.Columns.Add("Name"); dt.Columns.Add("Age"); DataRow dr1 = dt.NewRow(); dr1["Name"] = "a"; d...
阅读全文
摘要:线程池使用, 线程池中线程均为后台线程 Thread类使用
阅读全文
摘要:ftp://用户名:密码@IP/路径 FTP的一种登陆方式 如ftp://sing:song@192.168.1.133/upload/pic/236.jpg
阅读全文
摘要:测试连接 http://api.map.baidu.com/geocoder/v2/ak=ZndyfXErtTiZQwfgNgQ7yqb7ALKdk4DA&location=39.963175,116.400244&output=json 接口详细说明地址:http://lbsyun.baidu.c
阅读全文
摘要:取消架构 1、Parallel.For()方法的取消 2、任务的取消
阅读全文
摘要:1、线程池中的任务 2、同步任务 3、使用单独线程的任务 4、Future 任务结果 5、连续任务 6、任务层次结构
阅读全文
摘要:async 、 await 使用 条件退出 For<T> 使用 ForEach<T> 使用 Invoke 方法组调用
阅读全文
摘要:命名空间 : using System.Diagnostics.Contracts; 属性标记 : [ContractOption(category: "runtime", setting: "checking", enabled: true)] 事件订阅 : Contract.ContractFa
阅读全文
摘要:定义动态程序集 1 namespace DynamicAssembly 2 { 3 4 public class CodeDriver : MarshalByRefObject 5 { 6 private string prefix = 7 "using System;" + 8 "public s
阅读全文
摘要:详解 (1) public bool Start () System.Diagnostics.Process process = new System.Diagnostics.Process(); process.StartInfo.FileName = "iexplore.exe"; //IE浏览
阅读全文
摘要:首先编写ClickOnce更新事件, 配置项目发布 浏览发布地址进行安装 http://192.168.31.180:79/publish.htm 进行安装 点击update 更新,如果服务器上有版本更新, 就可下载文件覆盖
阅读全文
摘要:1 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = false)] 2 public class LastModifiedAttribute : Attribute 3 { 4 private reado...
阅读全文

浙公网安备 33010602011771号