I need to implement a custom ToString method for derived classes.
The method should return a string that is the result of concatenating the
results of a ToString on each of the fields in the class. Individual fields
can specify a custom attribute [Format=string] to allow for custom
formatting of values.
I think I know enough to implement this but if someone already has a sample
of something similar I would appreciate it.
My questions are these:
1. Once I create the method, how do I share it?
2. Can I put this in a base class and inherit this implementation?
3. Would inheritance be easier if the method name was not ToString but
perhaps Format?
4. What must I do to insure the fields are concatenated in the order they
are specified in the source?
TIA
Lee