⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configelement.cs

📁 自己做的一个浏览器~~大家请看看~如果合意给个彩头
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace APLib.Common.Configuration
{
	/// <summary>
	/// 配置节类
	/// <example><![CDATA[<nodename name="" value=""/>]]></example>
	/// </summary>
	public class ConfigElement : ConfigurationElement
	{
		#region 配置节属性
		/// <summary>
		/// 配置节配置值
		/// </summary>
		[ConfigurationProperty("value")]
		public string Value
		{
			get
			{
				return this["value"] as string;
			}
			set
			{
				this["value"] = value;
			}
		}
		/// <summary>
		/// 配置节键值
		/// </summary>
		[ConfigurationProperty("name", IsKey = true, IsRequired = false)]
		public string Name
		{
			get
			{
				return this["name"] as string;
			}
			set
			{
				this["name"] = value;
			}
		}

		#endregion

		/// <summary>
		/// 重载IsReadOnly,写操作允许
		/// </summary>
		/// <returns>false</returns>
		public override bool IsReadOnly()
		{
			return false;
		}

		/// <summary>
		/// 构造函数
		/// </summary>
		public ConfigElement()
		{
		}
		/// <summary>
		/// 构造函数
		/// </summary>
		/// <param name="name">配置节键值</param>
		public ConfigElement(string name)
		{
			Name = name;
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -