System.Windows.Forms.TabControl.TabPageCollection.IndexOfKey C# (CSharp) Method

IndexOfKey() public method

public IndexOfKey ( string key ) : int
key string
return int
			public virtual int IndexOfKey(string key)
			{
				if (string.IsNullOrEmpty (key))
					return -1;

				for (int i = 0; i < this.Count; i++) {
					if (string.Compare (this[i].Name, key, true, 
						System.Globalization.CultureInfo.InvariantCulture) == 0) {
						return i;
					}
				}

				return -1;
			}