What "[]" means in the method declaration

3

I have the following method

public BITalinoFrame[] Read(int nbSamples)
{
    try
    {
        return device.ReadFrames(nbSamples);
    }
    catch (Exception ex)
    {
        WriteLog("Error reading the frames: " + ex.Message);
    }    
    return null;
}

What I need to know is what the part means:

public BITalinoFrame[] Read(int nbSamples)
    
asked by anonymous 12.10.2017 / 19:56

1 answer

7

It means that the type to be returned is array of elements of class BITalinoFrame .

For example, the method below returns a array of integers:

public int[] ListaInteiros()
{
    int[] lista = new int[5] { 1, 2, 3, 4, 5 };
    return lista;
}
    
12.10.2017 / 20:26