A
adriaandavel
Hi all,
I am trying to use a collection of String Arrays in an inherited
instance of CollectionBase, but the InnerList.IndexOf does not seem to
work, any ideas?
My code is:
public void Add(string str1, string str2, string str3)
{
string[] Detail = new string[3] { str1, str2, str3};
this.InnerList.Add(Detail);
}
public int ArrayPosition(string str1, string str2, string str3)
{
string[] Detail = new string[3] { str1, str2, str3};
return InnerList.IndexOf(Detail);
}
The Add() works fine, and in the debugger I can see all the Arrays I've
added, but the ArrayPosition() always returns -1...
I am trying to use a collection of String Arrays in an inherited
instance of CollectionBase, but the InnerList.IndexOf does not seem to
work, any ideas?
My code is:
public void Add(string str1, string str2, string str3)
{
string[] Detail = new string[3] { str1, str2, str3};
this.InnerList.Add(Detail);
}
public int ArrayPosition(string str1, string str2, string str3)
{
string[] Detail = new string[3] { str1, str2, str3};
return InnerList.IndexOf(Detail);
}
The Add() works fine, and in the debugger I can see all the Arrays I've
added, but the ArrayPosition() always returns -1...