I have several classes in the library that present the results of analysis and verification of some files.
These classes contain enumerations, lists of invalid properties, etc.
I wrote a GUI application that uses a library, and wrote some functions for writing these classes in human-readable form in a rich text field.
It just seemed to me that I might have to write this formatting in an override of the ToString class.
However, all this formatting is very long, includes inserting tabs and new lines, includes several iterations over lists, retrieving description of enumerations, etc.
So, I was wondering - what is the standard for toString size and complexity? Should I write complex formatting in toString? Or maybe I should provide some other common interface - is there a common interface for formatted output for class printing? Or will I do this in a GUI application?
Thank!
source
share