Does anyone currently use Xamarin framework for development? Its supposed to enable you develop cross platform with c# but some C# code i use in a console app that works properly doesnt work in Xamarin.

Wandering if anyone has got that sorta issue.

Recommended Answers

All 5 Replies

  1. Don't use C#.
  2. See #1.
  3. See #2...

Snark aside, I don't use C# and .NET tools because MS can change the rules for them any time they want.

I don't use it.
Mostly develop small things for my own in VS2010 C#,C++,Python,F#.
@rubberman: Could you elaborate on what you mean by the rules of MS?

What code are you using? You might be trying to use something specific that Xamarin can't use cross-platform.

I have a php script that returns "success" if the values exist in the database.

                string x = Username.Text;
                string y = Password.Text;

                WebClient client = new WebClient();
                Uri uri = new Uri("");

                NameValueCollection parameter = new NameValueCollection();
                var res = client.UploadValues(uri, parameter);
                var g = Encoding.UTF8.GetString(res);
                response.Text = g;

So i expect my 'response' view to show 'success' along with a toast notification but it doesnt do anything.

Tried the same thing with RestSharp

                var client = new RestClient();
                client.BaseUrl = new Uri("");

                var request = new RestRequest("api/User/{u}/{p}");
                request.Method = Method.GET;
                request.RequestFormat = DataFormat.Json;
                IHttpResponse<user> rep = client.Execute<user>(request);

                response.Text = rep.Data.username;

But this time i used GET with a different url scheme and a soap webservice.

Yet nothing.

It doesnt react at all. Doesnt throw an error. Ive tried a bunch of other ways

Yet nothing.

And each method works on a console app. Its just strange.

Note: the '' maps to my PC's localhost. So thats not the issue.

So i got this working. My code was right the issue was that i had a proxy configured on my pc somehow. So i used netsh on the command line to reset it.

Hope this helps somebody.

Oh and i must say, it took me 2 months to figure that out. :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.