Click here to Skip to main content
15,889,691 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm trying to create the C # equivalent of this for each in java but I'm not very clear on how to do it. Any ideas?

for (Map.Entry<Integer, String> entry : hashSoc.entrySet()) {
                dq.write(entry.getValue());
                System.out.println("TSend: " + entry.getValue());

                inventory.deleteRecSocket(entry.getKey());
                inventory.addToSendSocket(entry.getValue());
            }


What I have tried:

I'm trying to convert this for each to your C # equivalent, but the dictionary class does not contain the setEntry.
Posted
Updated 8-Aug-17 6:05am
Comments
Richard MacCutchan 8-Aug-17 12:06pm    
So what data are you trying to read and which collection class is it held in?

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900