Whilst this is related to CSLA I think it's probably more of a general C#/.NET question.
Basically I have a class derived from NameValueListBase which contains an integer key and a string value.
What I really want is to override the string representation of the items within this list, which are obviously of type NameValuePair<int,string>. As NameValuePair is a nested class, I can't see how I can override the ToString function of this class to achieve this. Is this indeed impossible or am I missing something? Is there any other way to achieve this.
If the above isn't possible then what I need is an object which can hold an integer and string key/value pair but which returns only the string from the ToString override. Is there such a class in C#/.NET already or will I have to create one? The most obvious solution would be to derive a class from the KeyValuePair generic struct but it's sealed :(
Any advice appreciated.
Toby.
Copyright (c) Marimer LLC