在UWP項目下面的代碼拋出的ObjectDisposedException(針對Windows 10週年紀念版 - 14393):HttpMultipartFormDataContent.Dispose拋出的ObjectDisposedException
using (var content = new HttpMultipartFormDataContent())
{
//Why disposing of the content raises an exception?
}
異常消息是:Additional information: The object has been closed. (Exception from HRESULT: 0x80000013)
堆棧跟蹤:at System.Runtime.InteropServices.WindowsRuntime.IClosable.Close() at System.Runtime.InteropServices.WindowsRuntime.IClosableToIDisposableAdapter.Dispose() at App3.MainPage.ButtonBase_OnClick(Object sender, RoutedEventArgs e)
這是否意味着雖然HttpMultipartFormDataContent
執行IDisposable
它不應該被處置?
如果我不處理HttpMultiparFormDataContent
類型對象,我的應用程序還可以嗎?