I want to make backup List for Undo/Redo, But the object in the BackUp List will be change after I modified the object in the original List. How can I deal with this problem? "const", "in" seems not working.
private List<GeminiFileStruct> BackUpForUndoRedo(List<GeminiFileStruct> gfl,
ToolStripMenuItem tm)
{
var li =
(from i in gfl
select i).ToList();
tm.Enabled = true;
return li;
}
Sorry, it used to be struct. Cause some problem, I change to class. Could struct has Get/Set??? Green hand to C#.