Snippets of the day – Monday, March 10, 2014

Posted on Leave a commentPosted in Snippets

Here are some of the most recently published snippets! WPF TextBox style and control template sample WPF TextBox style and control template sample: TextBox.xaml Open the snippet Author:    ravi.anand007 LINQ: How to retrieve an IEnumerable collection with simple query This is a simple query in Linq to retrieve the list of Users that have […]

Snippets of the day – Monday, January 20, 2014

Posted on Leave a commentPosted in Snippets

Here are some of the most recently published snippets! Old Old autoSetFrameHeight Old Old autoSetFrameHeight: autoSetFrameHeight.js Open the snippet Author:    yicone http://www.tracefact.net/csharp-programming/immutable-atomic-value-types.aspx 1、当创建类型的目的是为了存储一组相关的数据,且数据量不是很大的时候,将它声明为Struct比Class会获得更高的效率;2、将类型声明为具有原子性和常量性,可以避免可能出现的数据不一致问题;3、通过在构造函数和Get访问器中,对对象的字段进行深度复制,可以避免在类型的外部修改类型内部数据的问题。 http://www.tracefact.net/csharp-programming/immutable-atomic-value-types.aspx 1、当创建类型的目的是为了存储一组相关的数据,且数据量不是很大的时候,将它声明为Struct比Class会获得更高的效率;2、将类型声明为具有原子性和常量性,可以避免可能出现的数据不一致问题;3、通过在构造函数和Get访问器中,对对象的字段进行深度复制,可以避免在类型的外部修改类型内部数据的问题。: immutable-atomic-value-types.cs Open the snippet Author:    yicone