//Closes Async Thread private void onResponse <T>(IAsyncResult result) where T : struct { AsyncResult res = (AsyncResult)result; ValueChanged <T> deleg = (ValueChanged <T>)res.AsyncDelegate; deleg.EndInvoke(result); }