SHARE
TWEET


to Stephen




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- class TestObj : IDisposable
- {
- private TaskCompletionSource<int> tcs;
- public TestObj()
- {
- tcs = new TaskCompletionSource<int>();
- }
- public void Dispose()
- {
- tcs.TrySetException(new AmbiguousMatchException());
- //tcs.TrySetCanceled();
- }
- }
- public partial class MainPage
- {
- // Constructor
- public MainPage()
- {
- InitializeComponent();
- }
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- base.OnNavigatedTo(e);
- for (int i = 0; i < 100000; i++)
- {
- using (var obj = new TestObj())
- {
- }
- }
- }
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.