public partial class Coordinator_UCD_SpecialFriend : System.Web.UI.UserControl { #region Custom Properties /// /// <summary>The EditMode property is responsible for the Enabled style of the controls</summary> /// private bool editMode ; [Description("The EditMode property is responsible for the Enabled style of the controls"), DefaultValue(true)] public bool EditMode { get { return editMode ; } set { editMode = value; } } #endregionWhen I set this property, I want to set all its inner controls Enabled property to the passed value.
this.EditMode = value myStaticClass.SetEnabledProperty(this, value)and the SetEnabledProperty method would be something like
lparameter loObject as Control for each loControls in loObject.Controls ... nextHow can I translate something like this into C# code?