public void PalindromeCheck_CheckValidStringPalindrome_True()
        {
            bool        testResult     = false;
            Palindrome1 testPalindrome = new Palindrome1();

            Assert.AreEqual(testResult, testPalindrome.PalindromeCheck("level"));
        }
Example #2
0
        public static void Main()
        {
            Console.WriteLine("Enter a string:");
            string enteredString = Console.ReadLine();

            Palindrome1 SomeObjectName = new Palindrome1();
            bool        result         = SomeObjectName.PalindromeCheck(enteredString);

            Console.WriteLine(result);
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                string userInput = TextBox1.Text;
                Palindrome1 test = new Palindrome1();

                bool result = test.IsPalindrome(userInput);
                if (result == true)
                    TextBox2.Text = "Yes";
                else TextBox2.Text = "No";
            }
            catch (Exception ex)
            {
                TextBox2.Text = "Please Enter A Valid Response";
            }
        }