Domanda

I'm trying to write a small chat over TCP/IP in dot42 using c#. The problem is the "Net.Sockets" is missing !! It's odd because it's part of the System in C#.

using System;
using Android.App;
using Android.Os;
using Android.Widget;
using Dot42;
using Dot42.Manifest;
using System.Net;
using System.Net.Sockets; // it is not recognized !
È stato utile?

Soluzione

eee already provided a solution for your problem. Let me try to answer the question "Why is System.Net.Sockets missing?".

As Bart points out, the Android API is available without limitations. The reason is that it is an automated conversion. So it is entirely available by design.

In contrast to the Android API, the .NET API is handcrafted on top of the Android API. For example, the .NET Dictionary class is implemented as a wrapper of java.util.Map and System.String as a wrapper of java.lang.String. In other words, we take the API from .NET but the implementation from Java. This is in contrast to Mono. You will see .NET types added in new releases.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top