OpenTween.HashtagManage.GetIndexOf C# (CSharp) Method

GetIndexOf() private method

private GetIndexOf ( ListBox list, string value ) : int
list ListBox
value string
return int
        private int GetIndexOf(ListBox.ObjectCollection list, string value)
        {
            if (string.IsNullOrEmpty(value)) return -1;

            int idx = 0;

            foreach (object l in list)
            {
                string src = l as string;
                if (string.IsNullOrEmpty(src))
                {
                    idx += 1;
                    continue;
                }
                if (string.Compare(src, value, StringComparison.OrdinalIgnoreCase) == 0)
                {
                    return idx;
                }
                idx += 1;
            }

            // Not Found
            return -1;
        }