Skip to content

Commit 9dc6196

Browse files
authored
Simplify TimeSpan construction (dotnet#9018)
1 parent e1d290b commit 9dc6196

File tree

1 file changed

+2
-2
lines changed
  • snippets/csharp/System.Windows.Input/CanExecuteRoutedEventArgs/Parameter

1 file changed

+2
-2
lines changed

snippets/csharp/System.Windows.Input/CanExecuteRoutedEventArgs/Parameter/Window1.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public Window1()
2929
// DispatcherTimer setup
3030
dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
3131
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
32-
dispatcherTimer.Interval = new TimeSpan(0,0,1);
32+
dispatcherTimer.Interval = TimeSpan.FromSeconds(1);
3333
dispatcherTimer.Start();
3434
//</SnippetInvalidateSampleDispatcherTimerInit>
3535
}
@@ -163,4 +163,4 @@ public object ConvertBack(object value, Type targetType,
163163
return null;
164164
}
165165
}
166-
}
166+
}

0 commit comments

Comments
 (0)