Why .NET does not provide implicit or explicit conversion converting from string to the defined type and from the defined type to the string?
Example:
public class MyClass
{
public int Id;
public MyClass()
{
}
}
I can do:
var myClass = new MyClass() {Id=1};
string myClassString = myClass.ToString();
WHY I CANNOT DO?:
var myClassConverted = (MyClass) myClassString ;
Is there any serialization pattern exist can to that?