无常

记录无常工作上的点点滴滴
posts - 106, comments - 344, trackbacks - 6, articles - 1

dot net

posted @ 2008-08-13 21:33 无常 阅读(197) | 评论 (3)  编辑 |

posted @ 2008-07-04 00:29 无常 阅读(91) | 评论 (0)  编辑 |

     摘要: WPF应用程序中的Application对象及MainWindow处理方法。  阅读全文

posted @ 2008-07-01 00:12 无常 阅读(106) | 评论 (0)  编辑 |

posted @ 2008-06-11 01:15 无常 阅读(302) | 评论 (0)  编辑 |

posted @ 2008-05-21 11:44 无常 阅读(216) | 评论 (4)  编辑 |

     摘要: AJAX编程经常需要Object<=>JSON之间转换,写了二个扩展方法:
public static string ToJSON(this object obj)
public static T ParseJSON(this string str)  阅读全文

posted @ 2008-03-08 21:59 无常 阅读(418) | 评论 (0)  编辑 |

     摘要: Javascript中的SetTimeout和SetInterval函数很方便,把他们移植到c#中来。
public static void SetTimeout(double interval, Action action)
public static void SetInterval(double interval, Action action)
  阅读全文

posted @ 2008-03-08 14:45 无常 阅读(2035) | 评论 (9)  编辑 |

     摘要: jQuery中使用each(callback)方法可以很方便的遍历集合,写了个c#版的,使用方法:
static void Main(string[] args)
{
string[] arr = new string[] { "A", "B", "C", "D", "E" };
arr.Each(p => Console.WriteLine(p));
Console.ReadKey();
}
  阅读全文

posted @ 2008-03-03 11:55 无常 阅读(368) | 评论 (2)  编辑 |

     摘要: 如果表中的字段类型为 char(1) 时,Linq to SQL生成char (System.Char)的属性。linq 语句where p.LineCode =='A'生成的SQL是WHERE UNICODE([t0].[LineCode]) = 65,这样会使LineCode列上的索失效,引起全表扫描...  阅读全文

posted @ 2008-02-24 13:30 无常 阅读(1657) | 评论 (1)  编辑 |

     摘要: 要在Asp.net web sites中使用PageMethods,必需要将服务端代码写在.aspx文件中...  阅读全文

posted @ 2008-02-23 23:52 无常 阅读(307) | 评论 (0)  编辑 |

posted @ 2008-02-21 22:58 无常 阅读(1900) | 评论 (9)  编辑 |

posted @ 2008-02-20 02:47 无常 阅读(1905) | 评论 (10)  编辑 |

posted @ 2008-02-20 00:48 无常 阅读(3525) | 评论 (35)  编辑 |

posted @ 2008-02-12 00:29 无常 阅读(1909) | 评论 (7)  编辑 |

posted @ 2008-02-10 19:37 无常 阅读(3876) | 评论 (18)  编辑 |

Full dot net Archive