public frmAddUpdatesSocialMedia(SocialMedia pSocialMediaPost, frmSocialMedia frmSocialMedia) { InitializeComponent(); this.Height = Screen.PrimaryScreen.Bounds.Height - 50; this.SocialMediaPost_Reflected = pSocialMediaPost; this.frmSocialMedia = frmSocialMedia; // this for to take clone of SocialMediaPost and when save it will reflect to original if (pSocialMediaPost != null) { // this means this post exists and will take copy(clone) of it this.SocialMediaPost_NotReflected = (SocialMedia)pSocialMediaPost.Clone(); } else { // this means this post doent exist (new post) this.SocialMediaPost_NotReflected = new SocialMedia(); this.SocialMediaPost_NotReflected.DateAndTime = DateTime.Now; } SetValues(); }