Division by Zero doesn’t always raise an exception

In this post, I would like to point out that dividing a number by zero doesn’t always raise an exception as is generally taken for granted. The raising of exception depends upon the type of the number being divided by zero. DivideByZeroException As the name itself suggests, this exception is raised at run time when […]

Finding the Longest substring in a string that is a palindrome

Hi, Recently my friend asked me this question so gave it a try and got it. So this is how the code goes: using System; using System.Collections.Generic; using System.Linq; namespace SubStringPalindrome { class Program { static int maxLength; static void Main(string[] args) { string inputString = “ootntannanitindennedadinidadeleveledaibohphobiatattarrattat”; string currentStr = string.Empty; List<string> listOfPalindromes = new […]