Monthly Archives: January 2017

Out parameters in Async methods.

A little while ago, I wanted to have an asynchronous method that returned a string but also populated an integer “out” parameter. So I started writing the method as below // Note: This will give compiler error. private async Task<string> … Continue reading

Posted in .NET | Tagged , , , | Leave a comment

Cannot access a disposed object. ‘System.Net.Http.StringContent’ While having retry logic.

Hi, I faced this scenario today when I was trying to make an HttpPost call using a retry logic wherein I was getting an ObjectDisposedException while trying to retry for the first time. Exception Message: Cannot access a disposed object. … Continue reading

Posted in General | Tagged , , , , , , , , , , , , | Leave a comment