.net 开发经验
TimeSpan
TimeSpan.TotalSeconds 也是有正负数的, 判断时间段大小时,需要用 Math.Abs()来取绝对值判定。
Collections.Specialized
The System.Collections.Specialized
namespace contains specialized and strongly-typed collections
; for example, a linked list dictionary, a bit vector, and collections that contain only strings.
特殊功能的集合
- NameValueCollection, 这个类型,有序的key-value pair, 并且相同key可以添加多条。 可用于formdata, header等。
System.Collections.Specialized.CollectionsUtil.CreateCaseInsensitiveHashTable()
, 创建字母大小写不敏感hashtable
HashTable
As entries are added to a hashtable, the hashtable’s actual load factor increases, and when the actual load factor reaches the maximum load factor value, the number of buckets in the hashtable is automatically increased by approximately a factor of two (to be precise(精确的说), the number of hashtable buckets is increased to the smallest prime number(素数) that is larger than twice the current number of hashtable buckets).