System.Configuration.SettingsPropertyValueCollection.SetReadOnly C# (CSharp) Method

SetReadOnly() public method

public SetReadOnly ( ) : void
return void
        public void SetReadOnly()
        {
            if (_ReadOnly)
                return;

            _ReadOnly = true;
            _Values = ArrayList.ReadOnly(_Values);
        }

Usage Example

		public void ReadOnly_Clear ()
		{
			SettingsPropertyValueCollection col = new SettingsPropertyValueCollection ();

			SettingsProperty test_prop = new SettingsProperty ("test_prop");
			SettingsPropertyValue val = new SettingsPropertyValue (test_prop);
			col.Add (val);

			col.SetReadOnly ();

			col.Clear ();
		}