/// <summary> /// 更新情報の設定 /// </summary> /// <param name="target">設定対象</param> /// <param name="source">設定元</param> private void SetUpdateInfo(T_DailyClasses target, T_DailyClasses source) { // publicのメンバー変数を取得 PropertyInfo[] propertyArray = source.GetType().GetProperties(); foreach (PropertyInfo property in propertyArray) { // 日付はスキップ if ("Date".Equals(property.Name)) { continue; } // 対象項目を設定 property.SetValue(target, property.GetValue(source)); } }