view IniKeyValuePairLine.cs @ 11:1c36044114a3

* Set default namespace no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Aug 2010 10:05:54 +0000
parents f6f726c92e56
children
line wrap: on
line source

// This file (IniKeyValuePairLine.cs) is a part of the IBBoard.Ini library and is copyright 2009 IBBoard.
//
// The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.

using System;

namespace IBBoard.Ini
{
	public class IniKeyValuePairLine : IIniLine
	{
		private string keyString;
		private string valueString;
		
		public IniKeyValuePairLine(string keyString, string valueString)
		{
			this.keyString = keyString;
			this.valueString = valueString;
		}

		//// <value>
		/// Gets the key part of the property (the part before the equals sign)
		/// </value>
		public string Key
		{
			get
			{
				return keyString;
			}
		}

		/// <summary>
		/// Gets the value part of the property (the part after the first equals sign)
		/// </summary>
		public string Value
		{
			get
			{
				return valueString;
			}
		}

		public override string ToString()
		{
			return Key + "=" + Value;
		}

	}
}