Home > Best Practices, C#, Never Do That > Compromise in code

Compromise in code

Today I encountered another wild animal while surfing in the jungle. Pretty much nothing to comment 🙂

if (visiblePath == null)
{
     visiblePath = new DispatcherTimer();
     visiblePath.Tick -= new EventHandler(visiblePath_Tick);
     visiblePath.Tick += new EventHandler(visiblePath_Tick);
     visiblePath.Interval = TimeSpan.FromSeconds(500);
}
else
{
     visiblePath.Tick -= new EventHandler(visiblePath_Tick);
     visiblePath.Tick += new EventHandler(visiblePath_Tick);
}
visiblePath.Stop();
visiblePath.Start();
  1. No comments yet.
  1. No trackbacks yet.

So that we know you're not a robot, please answer the question below: * Time limit is exhausted. Please reload CAPTCHA.