I have the following code inside a Xamarin Visual Studio .Net app:
[Service(Name = "MyServiceName")]
internal class MyService : Service
{
public MyService()
{
var thisName = nameof(this);
}
thisName should be MyServiceName. But this fails.
What is the right way, to get MyServiceName inside a method?
I want to get the name of the Service, not of a property inside the Service class.