using System;
using System.Text.RegularExpressions;
public class Program
{
public static void Main()
//Your html input
string htmlsource = "<b>Sample Code!</b><br /><i>this text! </i>";
//Regex to remove the html tags
string htmltagsremoved = Regex.Replace(htmlsource, "<[^>]*>", string.Empty);
Console.WriteLine(htmltagsremoved);
}