Search code examples
c#arraylistosc

looping through the values of an ArrayList in C#


I'm trying to figure out what sort of information these messages contain that are being streamed via OSC. The messages are being stored to an ArrayList. Here is the code:

public void OSCMessageReceived(OSC.NET.OSCMessage message){ 
        string address = message.Address;
        ArrayList args = message.Values;
}

How do I loop through the values of the arrayList args to output its contents?


Solution

  • you can try with this code

    foreach(var item in args )
    {
      Console.WriteLine(item);
    }