I have a class like this:
public class Foo { public string Regn{get;set;} public string DocName{get;set;} ... }
In my application, this class uses with IEnumerable:
IEnumerable<Foo> items;
How to get a new IEnumerable, where for all elements with the same Regn and DocName property, DocName is set like this (only if objects with the same DocName> 1):
item.DocName=item.DocName+".1";//+"2",etc.
[UPDATE] Input example:
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
source share