I'm having a List, it contains the Person's Information
C# Code:
List<string> Person = new List<string>() {"Watson", "1001", "Female"};
My Expected String should be
string format = @"Name: {0}({1}) - {2}";
string expectedString = string.Format(format, ......);
I wish to LOOP the List<string> Person as an argument within the method string.Format()
I need to format the string in dynamic not by index number (i.e., static).
The Output should be
string expectedString = "Name: Watson(1001) - Female";