_giuraemanuel
❔ Nullability issue
Sorry for the late reply. Here you go.
Based on this:
https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/statements-expressions-operators/how-to-define-value-equality-for-a-type
15 replies
❔ Hello everyone, can someone help me out understand this part!
Yes. Chances are good that the course is a sham. You could watch Tim Correy tutorials on YouTube. They are very good for free content. Well explained and easy to grasp. He also has his own website where he sells specialized content. I learned quite a few things from this guy. You can give it a try and see for yourself. Later!
143 replies
❔ Hello everyone, can someone help me out understand this part!
I'm a junior myself, someone who started this career path on the wrong foot, struggled quite a bit, and i still have some knowledge gaps here and there. But the suggestions i make are the ones i'd try to solve the problem. It's up to you how you want to solve the problem. But for me, it makes sense to use a dictionary. If you're unfamiliar with the structure then read up on it. There are plenty of good sources to get familiar with it. Then im sure you will understand even better why i suggested this approach. It's an option. You decide how to get it done. Two things make a programmer truly great : logical thinking and google searching skills. And you need to practice these skills constantly. Its the only way to grow and get better 🙂
143 replies
❔ Hello everyone, can someone help me out understand this part!
int lensesok(field cities, int n, int searchtemp)
- for this method another data structure would make more sense. Since you are supposed to return a city based on the temperature. You cannot store both the city and its designated temp inside an array. You need to use a dictionary. I suppose can use array for the first method and a dictionary for the second method tho im not sure it would make more sense.143 replies
❔ Hello everyone, can someone help me out understand this part!
but not the arrays and I would prefer practice using them, because I might need use them for career purposes in the futureFair enough, but most of the time you use lists with
foreach
or for
if you need the index. Tho it's pretty rare to see lists with for
. But yes, there's nothing wrong with practicing them. Just a little piece of advice tho. Don't be hellbent on using something just because you like it too much, or you need to practice it. What im saying is, use the appropriate tool. You may prefer idk, arrays over lists, but there are times when a list is 10 times more efficient than a list, for example. It depends on the context. So don't get too attached to something, that's all im saying. It's one thing to do the job but it's an entirely different story to do it right.143 replies
❔ Hello everyone, can someone help me out understand this part!
I think it's asking you to have a field that is either an array/list. Since vector is what youd call an array in C# anyway. And that field contains the cities. Then you search for the item you're looking for and if you find it then you return it's position/index
143 replies