Hello to everyone i have the next string
10502=3|10527=2006|10522=1|10504=25000|10505=100|10506=100|10508=25200|10509=200|10514=200|10510=200|10524=200|10525=200|10512=200|10513=200|10535=200|10536=200|10537=200|10516=2000|10517=23200|10518=1000|10519=22200|10520=1000| if you see all the items are separated by | i need to get this tree items |10535=200|10536=200|10537=200 and pass it to the end of the string sometimes the string it will contains this tree items but sometimes can contains two or one item in any case, i have to cut from its original place and put to the end of the string having this result
10502=3|10527=2006|10522=1|10504=25000|10505=100|10506=100|10508=25200|10509=200|10514=200|10510=200|10524=200|10525=200|10512=200|10513=200|10516=2000|10517=23200|10518=1000|10519=22200|10520=1000|10535=200|10536=200|10537=200|
im begining to build a method to do this but im halted i dont know who to do it
here its my code
using System;
namespace Arrays3
{
class Arrays3App
{
public string Reorderchain(string _originalChain)
{
string _newChain = String.Empty;
// Constant for test
_originalChain = "10502=3|10527=2006|10522=1|10504=25000|10505=100|10506=100|10508=25200|10509=200|10514=200|10510=200|10524=200|10525=200|10512=200|10513=200|10535=200|10536=200|10537=200|10516=2000|10517=23200|10518=1000|10519=22200|10520=1000|";
string [] result = _originalChain.Split(new Char[] {'|'});
for (int i = 0; i < result.Length; i++)
{
result;
}
// here i need to return the new chain
return _newChain;
}
}
}
any help will be apreciated a lot thanks anyway i hope anyone can help me
10502=3|10527=2006|10522=1|10504=25000|10505=100|10506=100|10508=25200|10509=200|10514=200|10510=200|10524=200|10525=200|10512=200|10513=200|10535=200|10536=200|10537=200|10516=2000|10517=23200|10518=1000|10519=22200|10520=1000| if you see all the items are separated by | i need to get this tree items |10535=200|10536=200|10537=200 and pass it to the end of the string sometimes the string it will contains this tree items but sometimes can contains two or one item in any case, i have to cut from its original place and put to the end of the string having this result
10502=3|10527=2006|10522=1|10504=25000|10505=100|10506=100|10508=25200|10509=200|10514=200|10510=200|10524=200|10525=200|10512=200|10513=200|10516=2000|10517=23200|10518=1000|10519=22200|10520=1000|10535=200|10536=200|10537=200|
im begining to build a method to do this but im halted i dont know who to do it
here its my code
using System;
namespace Arrays3
{
class Arrays3App
{
public string Reorderchain(string _originalChain)
{
string _newChain = String.Empty;
// Constant for test
_originalChain = "10502=3|10527=2006|10522=1|10504=25000|10505=100|10506=100|10508=25200|10509=200|10514=200|10510=200|10524=200|10525=200|10512=200|10513=200|10535=200|10536=200|10537=200|10516=2000|10517=23200|10518=1000|10519=22200|10520=1000|";
string [] result = _originalChain.Split(new Char[] {'|'});
for (int i = 0; i < result.Length; i++)
{
result;
}
// here i need to return the new chain
return _newChain;
}
}
}
any help will be apreciated a lot thanks anyway i hope anyone can help me