Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var lines = new[]
- {
- "Line A",
- "Line B",
- "Line C"
- };
- var query = lines.Select((line, index) =>; new
- {
- Prop = string.Format("Address {0}", index),
- Value = line
- });
- foreach (var prop in query)
- {
- Console.WriteLine("Prop: {0} - Value: {1} ",prop.Prop, prop.Value);
- }
Add Comment
Please, Sign In to add comment