Bug 5981 - AsyncTask documentation is broken; type Void is missing
Summary: AsyncTask documentation is broken; type Void is missing
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-04 10:13 UTC by Sebastian Krysmanski
Modified: 2014-07-30 10:27 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Sebastian Krysmanski 2012-07-04 10:13:25 UTC
Have a look at AsyncTask's documentation:

http://docs.mono-android.net/?link=T:Android.OS.AsyncTask#

In the section "AsyncTask's generic types" it says that one can use "Void" for type parameter's you don't need. But one can use neither "System.Void" nor (the not existing) Java.Lang.Void for type parameters.

Additionally the link to the Void type to be used is broken.
Comment 1 Sebastian Krysmanski 2012-07-04 10:20:28 UTC
I forgot to mention that this issue makes using AsyncTask in MonoDroid quite complicated because:

 1. You can't use "Void" for unneeded type parameters
 2. You can't use "object" for unneeded type parameters (see bug 5980)
 3. You can't use "Java.Lang.Object" for unneeded type parameters as this doesn't allow you to override "OnPostExecute()". (The compiler then says: "The inherited members 'Android.OS.AsyncTask<TParams,TProgress,TResult>.OnPostExecute(Java.Lang.Object)' and 'Android.OS.AsyncTask<TParams,TProgress,TResult>.OnPostExecute(TResult)' have the same signature in type 'MonoDroidUnit.GuiTestRunnerActivity.AsyncTestRunner', so they cannot be overridden")
Comment 2 Jonathan Pryor 2014-07-30 10:27:50 UTC
(1) (missing Void) has been fixed in monodroid/39c46bc4 as part of Bug #12347.