|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rubenhak.Utils;
namespace TestApplication
{
public class Person
{
private List<Person> _friends = new List<Person>();
public string Firstname { get; set; }
public string Lastname { get; set; }
[Cloneable(CloneableState.Exclude)]
[Cloneable(CloneableState.Include, "Friends")]
public List<Person> Friends { get { return _friends; } }
[Cloneable(CloneableState.Exclude)]
public PersonManager Manager { get; set; }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append(string.Format("[Person Name: {0} {1}, Friends: ", Firstname, Lastname));
foreach (Person friend in _friends)
sb.Append(friend.Firstname + ", ");
sb.Append(string.Format("Manager: {0}]", Manager));
return sb.ToString();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.