view IniCommentLine.cs @ 1:f9444f1786cd

Re #6 - INI parsing library * Add ToString methods * Add types of string and parse to objects instead of parsing to key-value pair * Create method to load INI data from string * Add content of AddSection method
author IBBoard <dev@ibboard.co.uk>
date Sun, 11 Jan 2009 15:37:14 +0000
parents
children f6f726c92e56
line wrap: on
line source

// This file (IniCommentLine.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. Please see COPYING.LGPL for more information and the full license.

using System;

namespace IBBoard.Ini
{
	/// <summary>
	/// A line in an IniFile that contains a comment
	/// </summary>
	public class IniCommentLine : IIniLine
	{
		private string comment;
		
		public IniCommentLine(string comment)
		{
			this.comment = comment.TrimStart(';');
		}

		//// <value>
		/// Gets the content of the comment
		/// </value>
		public string Comment
		{
			get
			{
				return comment;
			}
		}

		public override string ToString()
		{
			return ";" + Comment;
		}

	}
}