如果我有一个程序每秒多次执行Console.Writeline,并且程序长时间运行,控制台是否会溢出太多行?我只是想知道它是否最终会抛出IO异常,或者Console.Writelines的数量是否几乎无限.
我正在使用WPF MediaElement播放视频.当MediaElement暂停时,我将位置设置为视频中的另一个点.我希望MediaElement中的视频图像能够刷新以反映新的位置.但是在我再次按下"播放"按钮之前,它不会更新图像.有没有办法强制MediaElement图像刷新而不调用其Play方法?
代码示例
TimeSpan tsPosition = new TimeSpan(0,0,30); // set to 30 seconds
MediaElementObj.Position = tsPosition;
if (PlayStatus == PAUSED) // ignore if not paused
{
// image refresh method call here if there is a way to do it
}
Run Code Online (Sandbox Code Playgroud)