using System.Text.RegularExpressions;
public static void Main()
string str = "SomethingIsReallyGood";
string[] split = Regex.Split(str, @"(?<!^)(?=[A-Z])");
foreach (string s in split)
Console.WriteLine("Longest String");
var words = "This is a longest word in the statement and statement".Split(' ');
var longestWords = words.Where(w => w.Length == words.Max(m => m.Length)).Distinct();
Console.WriteLine("Longest words are: {0}", string.Join(", ", longestWords.ToArray()));
Console.WriteLine("smallest String");
words = "This is a longest word in the statement and statement".Split(' ');
var smallestWords = words.Where(w => w.Length == words.Min(m => m.Length) ).Distinct();
Console.WriteLine("Smallest words are: {0}", string.Join(", ", smallestWords.ToArray()));