interface IDirectory { public void Copy(); public void Move(IDirectory Directory); public void Delete(); } class Directory :IDirectory { public List<IDirectory> list = new List<IDirectory>(); public void Delete(IDirectory Dir) { foreach (IDirectory item in list) { item.Delete(); } } public void Add(IDirectory Dir) { list.Add(Dir); } public void Remove(IDirectory Dir) { list.Remove(Dir); } } class File : IDirectory { public void Copy() { // File copy code } public void Move(IDirectory Directory) { // File move code } public void Delete() { // File delete code } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)