Click here to Skip to main content
15,861,172 members
Articles / Programming Languages / C#

CodeDom Assistant

Rate me:
Please Sign up or sign in to vote.
4.84/5 (26 votes)
21 Sep 20074 min read 136.5K   6.6K   82  
Generating CodeDom Code By Parsing C# or VB
using System;
using System.Collections.ObjectModel;
using System.Text;

namespace ScintillaNet.Configuration
{
	public class KeyWordConfigList : KeyedCollection<int, KeyWordConfig>
	{
		protected override int GetKeyForItem(KeyWordConfig item)
		{
			return item.List;
		}
	}

	public class KeyWordConfig
	{
		private int _list;
		public int List
		{
			get
			{
				return _list;
			}
			set
			{
				_list = value;
			}
		}

		private string _value;
		public string Value
		{
			get
			{
				return _value;
			}
			set
			{
				_value = value;
			}
		}

		private bool? _inherit;
		public bool? Inherit
		{
			get
			{
				return _inherit;
			}
			set
			{
				_inherit = value;
			}
		}

		/// <summary>
		/// Initializes a new instance of the KeyWordConfig class.
		/// </summary>
		/// <param name="list"></param>
		/// <param name="value"></param>
		/// <param name="inherit"></param>
		public KeyWordConfig(int list, string value, bool? inherit)
		{
			_list = list;
			_value = value;
			_inherit = inherit;
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions