public void WriteProfile(IProfile clsProfile) { StringBuilder theString = new StringBuilder(); XmlWriter ProfileSettings = XmlWriter.Create(theString); ProfileSettings.WriteStartDocument(); clsProfile.WriteProperties(ProfileSettings); ProfileSettings.WriteEndDocument(); ProfileSettings.Flush(); if (!clsProfile.InstanceID.HasValue) clsProfile.InstanceID = Environment.TickCount; m_Router.SetProfileEntry("DEFAULT", ((int)clsProfile.ScreenID).ToString(), clsProfile.InstanceID.ToString(), theString.ToString()); }