I have such class:
public class Foo
{
public string Regn{get;set;}
public string DocName{get;set;}
...
}
In the my application this class uses with IEnumerable:
IEnumerable<Foo> items;
How to get new IEnumerable, where for all items with the same Regn and DocName property DocName sets like this(only if objects with same DocName >1):
item.DocName=item.DocName+".1";//+"2",etc.
[UPDATE] Input sample:
Regn DocName
1 1
1 2
1 2
2 5
2 5
2 6
Output:
Regn DocName
1 1
1 2.1
1 2.2
2 5.1
2 5.2
2 6