Какая альтернатива C# toString() [java]/__str__ [python]?C#

Место общения программистов C#
Гость
Какая альтернатива C# toString() [java]/__str__ [python]?

Сообщение Гость »


In Python __str__ / __repr__ are called by default by print function.
In Java public String toString() is called by System.out.println().

What is an alternative in C#?
How can I overload it? (Please provide small example.)


Источник: https://stackoverflow.com/questions/131 ... str-python

Вернуться в «C#»