I have two classes. One is this:
namespace DataStructures_Algorithms
{
public class BackendService
{
public class LocationServiceQueue
{
private static string deviceId;
private static POI currentPOI;
private static DateTime timeStamp;
private static ConcurrentQueue<DeviceMessage> concurrentQueue = new ConcurrentQueue<DeviceMessage>();
public static void Enqueue(DeviceMessage deviceMessage)
{
try
{
concurrentQueue.Enqueue(deviceMessage);
}
catch (Exception ex)
{
Console.WriteLine("Exception Occured in LocationServiceQueue Class " + ex.ToString());
}
}
}
}
and now i want to call enqueue method of LocationServiceQueue class.
backendService.LocationServiceQueue.Enqueue(new DeviceMessage
{
DeviceId = deviceID,
CurrentPOI = currentPOI,
Timestamp = DateTime.Now
});
it gives an error that you cannot access. How can I access?