Abstract Class Implementation

I’m attempting to use:

System.Net.NetworkInformation.UnicastIPAddressInformation.IPv4Mask.ToString()

I want to do this so I don’t have to rely on an old non-crossplatform .dll method I used to get the subnet mask on Windows. Does anyone know another easy method to retrieve the subnet mask in Unity or how to utilize an abstract class? Multiple inheritance is impossible in C# and you have to have a MonoBehaviour extending any Unity game object so this is difficult.

This is the ugly attempt …

using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
using System.Net;
using System.Net.NetworkInformation;

public class getSubnetMask : MonoBehaviour
{
	[ DllImport( "ipHelper" ) ]
	private static extern string internalGetSubnetMask();
		
	public class ipAddressInformation : System.Net.NetworkInformation.UnicastIPAddressInformation // An attempt to use the class without multiple inheritance
	{
		//public abstract IPAddress IPv4Mask { get; } // Unity is asking me to implement these
	}
	
	public ipAddressInformation subnetMaskInfo = new ipAddressInformation();	
		
	void Start()
	{
		//string subnetMask = internalGetSubnetMask(); // My old .dll method
		string subnetMask = subnetMaskInfo.IPv4Mask.ToString();
		SendMessage( "initBroadcastAddress", subnetMask );
	}
}

you can do an implementation of just that abstract class and then use it in your monobehaviour