G
Guest
Hello, friends,
In c#.net, can we enumerate two collections in the same loop? For example:
foreach (int amount in AmountCollection && string lastName in
LastNameCollection)
{
Console.WriteLine(lastName + " made $" + amount.ToString() + " this
week.");
}
Can we do something like this in .net? If yes, what is the correct syntax?
If not, how to do this operation this efficiently?
Thanks a lot.
In c#.net, can we enumerate two collections in the same loop? For example:
foreach (int amount in AmountCollection && string lastName in
LastNameCollection)
{
Console.WriteLine(lastName + " made $" + amount.ToString() + " this
week.");
}
Can we do something like this in .net? If yes, what is the correct syntax?
If not, how to do this operation this efficiently?
Thanks a lot.