Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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
GitHub or Developer Community 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.
According to Microsoft, I should be able to add to the headers being sent to a web service using the likes of
List<WebHeaderCollection> collection = new List<WebHeaderCollection>;
This is currently giving an error that there is no such method of Add taking 2 parameters. This would be correct, except that http://msdn.microsoft.com/en-us/library/system.net.webheadercollection(v=vs.110).aspx says there is an override to Add.
I'm attempting to write a PCL and have not tried this on a PC using VS.
The error is correct. You are adding an item to System.Collections.Generic.List and not to System.Net.WebHeaderCollection.
You like should be
var collection = new WebHeaderCollection ();
Which when you try gives a compiler error that there isn't an overload for Add that accepts two string parameters...
Works fine for me