/* File Item.csc part of the serializableDemo example Mike Barnes 11/15/03 */ using System; using System.IO; using System.Runtime.Serialization; namespace serializableDemo { [Serializable] class Item { private string descript, note; private bool hasNote; public Item() { hasNote = false; descript = note = null; } public Item(String description, String aNote) { hasNote = true; descript = description; note = aNote; } public Item(String description) { hasNote = false; descript = description; note = null; } public override string ToString() { string str; if (hasNote) str = descript + " hasNote " + hasNote + "\n" + note; else str = descript + " hasNote " + hasNote; return str;} } // Item }