T
Terry
I created a collection derived from CollectionBase that is just made up of
strings, called "StringList". I have another object that has as a member
one of these StringList.
If I assign that object to a PropertyGrid, click on the collection editor
"..." and try to add a new string, I get an error message "Constructor on
type System.String not found.".
Any ideas what I'm missing? If it can't create a new object of one of the
built-in base types something is wrong.
Thanks,
Terry
Here's my "StringList" class for reference
using System;
using System.Collections;
namespace TestStringListAdd
{
/// <summary>
///
/// </summary>
public class StringList : CollectionBase
{
public StringList()
: base()
{
}
public void Add( String str )
{
this.List.Add( str );
}
public void Remove( String str )
{
this.List.Remove( str);
}
public string this[ int index ]
{
get
{
return (String)this.List[index];
}
}
}
}
strings, called "StringList". I have another object that has as a member
one of these StringList.
If I assign that object to a PropertyGrid, click on the collection editor
"..." and try to add a new string, I get an error message "Constructor on
type System.String not found.".
Any ideas what I'm missing? If it can't create a new object of one of the
built-in base types something is wrong.
Thanks,
Terry
Here's my "StringList" class for reference
using System;
using System.Collections;
namespace TestStringListAdd
{
/// <summary>
///
/// </summary>
public class StringList : CollectionBase
{
public StringList()
: base()
{
}
public void Add( String str )
{
this.List.Add( str );
}
public void Remove( String str )
{
this.List.Remove( str);
}
public string this[ int index ]
{
get
{
return (String)this.List[index];
}
}
}
}