Exemple #1
0
        /// <summary>
        ///   オブジェクトのフィールドとその値からObjectDictionaryを作る。
        ///   キー並べ替え関数指定版。
        /// </summary>
        public static ObjectDictionary FromObjectFields(object obj, IComparer <string> cmp)
        {
            ObjectDictionary dict = new ObjectDictionary(cmp);

            if (obj == null)
            {
                return(dict);
            }
            dict.SetObjectFields(obj);
            return(dict);
        }