Skip to content

Instantly share code, notes, and snippets.

@EgorBo
Created October 6, 2017 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EgorBo/3b06b270b1dcb7932e1061343ee31353 to your computer and use it in GitHub Desktop.
Save EgorBo/3b06b270b1dcb7932e1061343ee31353 to your computer and use it in GitHub Desktop.
using System.Threading;
namespace ConsoleApplication
{
internal class Program
{
public static void Main(string[] args)
{
var t = new Timer(new TimerCallback(_ => { }), null, 1, 1);
t.Dispose();
t.Change(1, 1); //and other methods
//.NET: ObjectDisposedException is thrown
//Mono: no exception
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment