Hello, I modified some code I found after a search on google. The original code was written my jmc. It originally, on the original code, a void. I tried to modify it to work with a string[].

I am currently getting a Parameter count error message.

Code:
private delegate string[] GetRtbSongsLinesDelegate(object item);
        private string[] GetRtbSongsLines(object item)
        {
            if (this.rtbSongs.InvokeRequired)
            {
                // This is a worker thread so delegate the task.
                this.rtbSongs.Invoke(new GetRtbSongsLinesDelegate(this.GetRtbSongsLines),null);
            }
            else
            {
                // This is the UI thread so perform the task.
                return this.rtbSongs.Lines;
            }
            return null;
        }
I am calling this using:
Code:
GetRtbSongsLines(null)
For example:
Code:
if(GetRtbSongsLines(null).length > 0){
//There are more than 0 lines
}
What's wrong?