The context of my question is that I'm using MonoDroid to write a program to consume WCF services. I wanted some of the C# libraries regarding SOAP in C# so MonoDroid was an obvious choice.
I am stuck trying to pass void as template parameter to AsyncTask.
The documentation that Xamarin (developers of MonoDroid) gives on AsyncTask leaves much to be desired and can be found here : http://docs.mono-android.net/?link=C%3aAndroid.OS.AsyncTask
What I need to do, I accomplished in Java with an AsyncTask defined like this
public class SoapRequestTask extends AsyncTask<Void, Void, String>
What is the C# equivalent of a void template parameter?
I actually found the answer to this for anyone who is interested:
The syntax is
private class SoapTask : AsyncTask{}
And it works just like AsyncTask in java, but the parameters are all Java.Lang.Objects (with the exception that the parameters type is a Java.Lang.Objects[] ) so you can just set them as needed in the body.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With