Simplfying this code

To me, this code is Ugly. I can see a few other ways to do this, but I wanted to reach out and see if anyone else has a simpler solution. if (!String.IsNullOrEmpty(searchText)) { List<string> distinctWords = new List<string>(searchText.Split(‘ ‘).Distinct()); string regex = @”(” + String.Join(“|”, distinctWords) + “)”; activities = activities.Where(x => Regex.Match((x.Text), regex, […]

Animated Hover Effect On Controls?

Hello reddit. I wanted to have smooth transition of background color on MouseEnter and MouseLeave event. Right now, every .NET application I see has the usual hover effect where the color change is very rapid. If anyone worked with CSS before, you may know property called ‘transition-duration’ which slows down the effect creating a good […]