随笔分类 -  Programming---C# Programming Beginning

1
摘要:It is very useful in .net we can user framework provided role manager, and easily configure in Web.Config. However, I find when I fullfil such configu 阅读全文
posted @ 2016-10-20 11:55 Jeremy Wu 阅读(446) 评论(0) 推荐(0) 编辑
摘要:Reference article: https://rkeithhill.wordpress.com/2007/09/16/effective-powershell-item-7-understanding-output/ 阅读全文
posted @ 2016-08-09 10:13 Jeremy Wu 阅读(194) 评论(0) 推荐(0) 编辑
摘要:Recently, I find I used many different type method to invoke other scripts or exe in PowerShell. Maybe by start new process, or just use the call oper 阅读全文
posted @ 2016-07-22 16:29 Jeremy Wu 阅读(256) 评论(0) 推荐(0) 编辑
摘要:If I create a new array, and using the method Add(). Windows PowerShell will tell me : Reason: When you use the $array.Add() method, you're trying to 阅读全文
posted @ 2016-07-20 11:30 Jeremy Wu 阅读(734) 评论(0) 推荐(0) 编辑
摘要:hashtable is easy to create, access and manipulate. we simply use to create an empty hash table. and use to set the key and value pair. refer to http: 阅读全文
posted @ 2016-05-31 16:21 Jeremy Wu 阅读(165) 评论(0) 推荐(0) 编辑
摘要:When PS scripts executes, it is possibly create much user defined variables. So, sometimes these varibales may confuse us a lot. Here's a workaound: M 阅读全文
posted @ 2016-04-29 12:18 Jeremy Wu 阅读(216) 评论(0) 推荐(0) 编辑
摘要:E.g I want match the keword "3398" after "red" from the string "This is red with number 3398". Using non-capturing group regex will help me sovle this 阅读全文
posted @ 2016-04-05 10:22 Jeremy Wu 阅读(297) 评论(0) 推荐(0) 编辑
摘要:Sometimes, if we want to do convert between two enums, firstly, we may think about one way: Obviously, it's dangerous, if the int value of TheirMale i 阅读全文
posted @ 2016-03-21 15:28 Jeremy Wu 阅读(249) 评论(0) 推荐(0) 编辑
摘要:When I want to pass some value that won't be seen by users, I find it useful to use this. It can help us creates a hidden input on the form for the fi 阅读全文
posted @ 2016-02-27 12:31 Jeremy Wu 阅读(648) 评论(0) 推荐(0) 编辑
摘要:先来看一下默认的连接SQL Server数据库配置 SqlConnectionStringBuilder实例化时需要使用connectionString。如:SqlConnectionStringBuild builder = new SqlConnectionStringBuild(connect... 阅读全文
posted @ 2016-01-05 10:45 Jeremy Wu 阅读(227) 评论(0) 推荐(0) 编辑
摘要:#Select specified items from Tuple List##Select one item to form list`tupleList.Select(element => new string(element.Item1)).ToList();`##Select one it... 阅读全文
posted @ 2015-12-17 19:50 Jeremy Wu 阅读(197) 评论(0) 推荐(0) 编辑
摘要:Yield has two great usesIt helps to provide custom iteration with out creating temp collections.It helps to do stateful iterationIteration. It creates... 阅读全文
posted @ 2015-12-14 10:10 Jeremy Wu 阅读(164) 评论(0) 推荐(0) 编辑
摘要:we can copy files by the powerful robocopy tool, and it allow copy using muliti-threaded as well.As Robocopy is generally a command-line only utility ... 阅读全文
posted @ 2015-11-25 11:43 Jeremy Wu 阅读(217) 评论(0) 推荐(0) 编辑
摘要:In .net 4.5 Framework, we can zip a file by this way: private static string CompressFile(string sourceFileName) { using (ZipA... 阅读全文
posted @ 2015-11-20 15:07 Jeremy Wu 阅读(320) 评论(0) 推荐(0) 编辑
摘要:From: http://www.cnblogs.com/wJiang/archive/2010/02/21/1670632.htmlMoq即Mock You Framework,故名思意是一个类似Mockery,JMock的Mock框架。 是google上的一个.net开源项目项目扉页相关下载ht... 阅读全文
posted @ 2015-07-23 19:14 Jeremy Wu 阅读(248) 评论(0) 推荐(0) 编辑
摘要:IList, ICollection ,IEnumerable很显然,这些都是集合接口的定义,先看看定义: 1 // 摘要: 2 // 表示可按照索引单独访问的对象的非泛型集合。 3 [ComVisible(true)] 4 public interface ILis... 阅读全文
posted @ 2015-07-17 09:54 Jeremy Wu 阅读(244) 评论(0) 推荐(0) 编辑
摘要:引言1.理解多线程2. 线程异步与线程同步3.创建多线程应用程序3.1通过System.Threading命名空间的类构建3.1.1异步调用线程3.1.2并发问题3.1.3线程同步3.2通过委托构建多线程应用程序3.2.1线程异步3.2.2线程同步3.3BackgroundWorker组件4.总结引... 阅读全文
posted @ 2015-07-16 17:08 Jeremy Wu 阅读(368) 评论(0) 推荐(0) 编辑
摘要:readonly (C# Reference)readonly 关键字是可以在字段上使用的修饰符。 当字段声明包括 readonly 修饰符时,该声明引入的字段赋值只能作为声明的一部分出现,或者出现在同一类的构造函数中class Age { readonly int _year;... 阅读全文
posted @ 2015-07-16 10:29 Jeremy Wu 阅读(133) 评论(0) 推荐(0) 编辑
摘要:异步方法容易编写string urlContents = await client.GetStringAsync(); 以下特征总结了使上面一个异步方法。方法签名包含一个 Async 或async 修饰符。异步方法的名称以“Async”后缀,按照约定,关闭。返回类型为下列类型之一:Task,如果您... 阅读全文
posted @ 2015-07-15 17:47 Jeremy Wu 阅读(337) 评论(0) 推荐(0) 编辑
摘要:引用的时候需要在参数和使用的时候加上 ref 关键字 static bool addnum (ref int val) //引用 { ++val; return true; }参数数组的概念,可以接受该类型的... 阅读全文
posted @ 2015-07-09 11:00 Jeremy Wu 阅读(193) 评论(0) 推荐(0) 编辑

1
点击右上角即可分享
微信分享提示