private IEnumerable<Player> GetGamePlayers(string content, string map)
{
List<Player> Players = new List<Player>();
var positions = new List<int>();
for (int i = 0; i < 5; i++)
{
positions.Add(content.IndexOf(String.Format("[{0}] (com.riotgames.platform.gameclient.domain::PlayerParticipantStatsSummary)", i)));
}
for (int i = 0; i < 5; i++)
{
positions.Add(content.IndexOf(String.Format("[{0}] (com.riotgames.platform.gameclient.domain::PlayerParticipantStatsSummary)", i), positions[4] + 500));
}
foreach (var position in positions)
{
//NEED HELP HERE!
var section = content.Substring(position, )
Players.Add(ParsePlayer(section));
}
return Players;
}
Переменная положений содержит начальные индексы нужных мне разделов.
Так что в основном мне нужна подстрока из позиции [0] в позицию [1] - 1.
Есть предложения?