I have a custom dictionary and i would like to bind it to a control.
Since Dictionary doesn't implement IList i would have to write it. Is
the only way to do this to keep another collection that matches the key
in the dictionary to an index in the collection?
dan
Here is the code i want to add IList to.
public interface ISystemMessageData
{
String MessageID { get; set;}
String WhseID { get; set;}
String Flag { get; set;}
String MessageDate { get; set;}
String UserID { get; set;}
String Message { get; set;}
String PersonID { get; set;}
String MachineName { get; set;}
String DeviceID { get; set;}
String Subject { get; set;}
String ToEmail { get; set;}
String EmailFlag { get; set;}
String FromEmail { get; set;}
}
[Serializable]
public class RemoteDataCollection<TKey, TValue> :
System.Collections.Generic.Dictionary<TKey, TValue>
{
public RemoteDataCollection() { }
protected
RemoteDataCollection(System.Runtime.Serialization. SerializationInfo
info, System.Runtime.Serialization.StreamingContext context) :
base(info, context) { }
}
[Serializable]
public class SystemMessageDataCollection :
RemoteDataCollection<String, ISystemMessageData>
{
public SystemMessageDataCollection() { }
protected
SystemMessageDataCollection(System.Runtime.Seriali zation.SerializationInfo
info, System.Runtime.Serialization.StreamingContext context):base(info,
context){}
}