I'm new to Xamarin and made two interfaces for Android and iOS. I have one Core project and put references in the Android and iOS project to the Core project.
How can I use code from my Core project in my iOS/Android project?
For example, this is my Core class TestClass.cs:
using System;
using System.Threading.Tasks;
namespace FindMyRide.Core
{
public class TestClass
{
public string TestString { get; set; }
public TestClass ()
{
TestString = "Hallo";
}
}
}
How can I display the TestString in my iOS or Android application?
I don't know if this is the correct use of shared coding in Xamarin, as I said I'm very new to this and to C#.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.