C# Saved Program: serene-af

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


//This C# program will take an input string,  check whether or not a it is a palindrome
using System;
namespace palindrome
{
    class Program
    {
        static void Main(string[] args)
        {
            WebBrowser _browser;
this._browser.DocumentCompleted+=new WebBrowserDocumentCompletedEventHandler(browser_DocumentCompleted);

private void browser_DocumentCompleted(Object sender, WebBrowserDocumentCompletedEventArgs e)
{
    this._browser.Document.Body.MouseDown += new HtmlElementEventHandler(Body_MouseDown);
}

void Body_MouseDown(Object sender, HtmlElementEventArgs e)
{
    switch(e.MouseButtonsPressed)
    {
    case MouseButtons.Left:
        HtmlElement element = this._browser.Document.GetElementFromPoint(e.ClientMousePosition);
        if(element != null && "submit".Equals(element.GetAttribute("type"),StringComparison.OrdinalIgnoreCase)
        {
    break;
    }
}
        }
    }
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs