2010-11-29から1日間の記事一覧
public static D safeAdd<D, C, K, V>(D map, K key, V value) where C : ICollection<V>, new() where D : IDictionary<K, C> { C list; if (!map.TryGetValue(key, out list)) { list = new C(); map.Add(key, list); } list.Add(value); return map; } C# *1 で少しメタメタな</k,></v></d,>…