1

I'm using FireSharp to manage an array of items in a Firebase Realtime database.

I'm trying to implement a kind of queue of 30 messages.

I want to manage only 30 messages and if a new message is received, the first in time order should be deleted.

How can i do it?

In this moment I'm just adding items to the array in this way:

IFirebaseConfig config = new FirebaseConfig{
        BasePath = _RHDLLConfig.firebaseJsonUrl
};
IFirebaseClient client = new FirebaseClient(config);

client.Push("signals", rh);

I want to delete the first element before to push a new one...

The array looks like this:

enter image description here

How can I do it?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
DarioN1
  • 2,460
  • 7
  • 32
  • 67

1 Answers1

1

This will remove the first element of the array

signals = signals.Skip(1).ToArray();  
Carlos Alves Jorge
  • 1,919
  • 1
  • 13
  • 29