D.Mentia
✅ Can you make labels scroll alongside input?
I agree that smaller font would be best, and/or a scroll bar for it.
Otherwise, if you don't like those ideas, you mention it's a label, so it might help if the text goes into a text box component instead of a label, then right align might do it automatically. Users could also type in the numbers directly, but be careful they don't type in random C# code that you execute If it is a label, autosize, text align right, and anchor right, should let it extend to the left as it gets longer, and then it would end up under the gray area if z-ordered correctly and 'cut off' the left side
Otherwise, if you don't like those ideas, you mention it's a label, so it might help if the text goes into a text box component instead of a label, then right align might do it automatically. Users could also type in the numbers directly, but be careful they don't type in random C# code that you execute If it is a label, autosize, text align right, and anchor right, should let it extend to the left as it gets longer, and then it would end up under the gray area if z-ordered correctly and 'cut off' the left side
54 replies
Converting a string to a list of objects using only LINQ.
If you can control the input format, probably just make it json, it's much simpler. Otherwise something like
but you may have problems with line endings sometimes being
\r\n
or \r
or \n
... also notably, it doesn't make sense for one entry on a shopping list to be a ShoppingList24 replies
✅ Delegates. What are they and what are they used for?
I explained them above if you need it worded a different way https://discordapp.com/channels/143867839282020352/1292841177971953674/1292859785363853395
375 replies
✅ Delegates. What are they and what are they used for?
often when we say things like "you don't know X", what we mean is that you should pretend you don't know X because X is handled somewhere else, it's not your job right now, and in theory someone else might be the one writing X, not you
375 replies
✅ Delegates. What are they and what are they used for?
when your programs get big and complicated, the 'you' that writes one method might be you from a month ago and not the same you that's writing the second method 😛 and so that second you doesn't know what the first one does anymore
375 replies
✅ Delegates. What are they and what are they used for?
timers are still probably a good example of when they are quite useful, if you wanted it to add those numbers 10s later, and you subtract them now, that timer has to be given a delegate so it knows what to do in 10s
375 replies
✅ Delegates. What are they and what are they used for?
But imagine or maybe write it the other way around, where you first ask if they want to add or subtract. Then you call HandleInput(calc.Add) or (calc.Sub), and HandleInput is a method that asks for those numbers and just calls whatever method was passed to it
375 replies
✅ Delegates. What are they and what are they used for?
it'll return false, and
numbers
will (at that point) exist but be 0, the default value, which is why you have to do the if check. So you can tell if they actually put in 0, or if it just couldn't read a value375 replies