I have a simple model
public class OneModel
{
public string Email { get; set; }
public string Name { get; set; }
}
And I created a simple list (OneModel datatype):
List<OneModel> someLists = new List<OneModel>{
new OneModel{Name="A 1", Email="[email protected]"},
new OneModel{Name="A 2", Email="[email protected]"},
new OneModel{Name="A 3", Email="[email protected]"},
new OneModel{Name="B 1", Email="[email protected]"},
new OneModel{Name="C 1", Email="[email protected]"},
}
I want to create another list with random concatenated Name from first list, like as:
List<string> ... {"A 1-A 3", "A 2-C 1",...} or something like that.
How to do that ?