What are the original reasons for ToString() in Java and .NET?

后端 未结 4 887
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-06 02:01

I\'ve used ToString() modestly in the past and I\'ve found it very useful in many circumstances. However, my usage of this method would hardly justify to put th

4条回答
  •  爱一瞬间的悲伤
    2020-12-06 03:03

    I guess it was just considered useful that any object can have a string representation, if only for debugging purposes...

提交回复
热议问题