Generate Menus Using XML

Introduction In this article, I am going to show how to easily generate menus using XML from the data source in Asp.net C#. By using this we can define the hierarchy separately in XML and use the same in the menus. Below is the real time code I have used …

How to Log an Exception With a Simple Example in C#

Introduction In this article, I have shared how to log an exception in a text document so that it will be stored permanently in the database. I have attached the source code in the attachment section. Write the following code in catch block of any event: protected void btnsave_Click(object sender, EventArgs e)   {       try       { …

Ways Of Determining If A Word/String Is a Palindrome

Introduction In the below content, you will find simple, different, yet important ways to find whether a string /word is palindrome or not. Way 1 : Using Array. Reverse () Method using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ProgrammingInterviewFAQ.Palindrome {     class UsingReverseMethod {         static void Main() {             Console.WriteLine(“Enter the String to check:”);             String input = Console.ReadLine();             string output = string.Empty;             char[] inputtochar = input.ToCharArray(); // this line converts the string to char for reversing             Array.Reverse(inputtochar); // this line actually reverse the Converted CharArray             output = new string(inputtochar); //this line converts the ReversedcharArray back to string             if (input == output) {                 Console.WriteLine(“Palidrome”);                 Console.ReadLine();             } else { …