NAnt.Core.DirScannerStringCollection.IndexOf C# (CSharp) Method

IndexOf() public method

Searches for the specified string and returns the zero-based index of the first occurrence within the DirScannerStringCollection.
String comparisons within the DirScannerStringCollection are only case-sensitive if CaseSensitive is .
public IndexOf ( string value ) : int
value string The string to locate. The value can be .
return int
        public new virtual int IndexOf(string value)
        {
            if (value == null || CaseSensitive) {
                return base.IndexOf(value);
            } else {
                foreach (string s in this) {
                    if (string.Compare(s, value, true, CultureInfo.InvariantCulture) == 0) {
                        return base.IndexOf(s);
                    }
                }
                return -1;
            }
        }