I converted class objet to String line
As in the following example
public class Person
{
public int ID { get; set; }
public string Name { get; set; }
public string Surname { get; set; }
public string Address { get; set; }
public override string ToString()
{
return $"{ID}|{Name}|{Surname}|{Address}";
}
}
Person person = new Person();
person.Name = "test1";
person.Surname = "test2";
person.Address = "test3";
var _String = person.ToString();
Console.WriteLine(_String);
This is the output
0|test1|test2|test3
I want to convert the line (0|test1|test2|test3) to class objet
What is the best way to do this to dotnet standard 2.0