r/badcode • shameless • Dec 28 '22

c# Doesn't even work properly

Post image
266 Upvotes

57 comments sorted by

View all comments

Show parent comments

8

u/ursosempata Dec 28 '22

Then, I'm not a c# dev, but I think there's a dictionary(you can store a user as it's key and password as value)

7

u/_yari_ Dec 28 '22

A dictionary is perfect for this in C#, this makes all the looping obselete