Click here to Skip to main content
15,303,522 members
Home / Discussions / C#
   

C#

 
GeneralRe: Blazor: IEnumerable ElementAt Pin
#realJSOP3-Jan-22 22:39
mva#realJSOP3-Jan-22 22:39 
AnswerRe: Blazor: IEnumerable ElementAt Pin
OriginalGriff3-Jan-22 2:23
mveOriginalGriff3-Jan-22 2:23 
AnswerRe: Blazor: IEnumerable ElementAt Pin
Gerry Schmitz3-Jan-22 5:51
mveGerry Schmitz3-Jan-22 5:51 
GeneralRe: Blazor: IEnumerable ElementAt Pin
OriginalGriff3-Jan-22 6:28
mveOriginalGriff3-Jan-22 6:28 
Questioncausing the computer to freeze Pin
CalinNegru2-Jan-22 4:01
MemberCalinNegru2-Jan-22 4:01 
AnswerRe: causing the computer to freeze Pin
Gerry Schmitz2-Jan-22 4:42
mveGerry Schmitz2-Jan-22 4:42 
GeneralRe: causing the computer to freeze Pin
CalinNegru3-Jan-22 8:11
MemberCalinNegru3-Jan-22 8:11 
AnswerRe: causing the computer to freeze Pin
OriginalGriff2-Jan-22 6:29
mveOriginalGriff2-Jan-22 6:29 
A while loop isn't an error as far as the system is concerned - it just means that your display can't be updated and user input is ignored until the loop exist and the event handler is finished. The system doesn't "know" how long you will be looping for and has to assume that you intended that to happen!

Unbounded recursion is different: each recursive call uses up an amount of some special memory called the stack - and when that runs out (and it does, pretty quickly) you app has to stop running because it can't execute any more code; it needs the stack to do anything. So it throws an exception - Stack overflow - which the debugger picks up for you and stops you app so you can see what is happening.

You shouldn't use big loops in event handlers - they should be moved to a second thread so that the UI thread can continue to update the display and deal with user input. Have a look here: BackgroundWorker Class (System.ComponentModel) | Microsoft Docs[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: causing the computer to freeze Pin
CalinNegru3-Jan-22 6:13
MemberCalinNegru3-Jan-22 6:13 
GeneralRe: causing the computer to freeze Pin
OriginalGriff3-Jan-22 6:45
mveOriginalGriff3-Jan-22 6:45 
AnswerRe: causing the computer to freeze Pin
#realJSOP2-Jan-22 23:53
mva#realJSOP2-Jan-22 23:53 
AnswerRe: causing the computer to freeze Pin
0x01AA5-Jan-22 4:40
professional0x01AA5-Jan-22 4:40 
QuestionAsync/Await Questions Pin
Kevin Marois30-Dec-21 7:35
professionalKevin Marois30-Dec-21 7:35 
AnswerRe: Async/Await Questions Pin
Gerry Schmitz30-Dec-21 18:43
mveGerry Schmitz30-Dec-21 18:43 
QuestionRead signature data from APK's RSA signature file Pin
mynametaken30-Dec-21 4:46
Membermynametaken30-Dec-21 4:46 
AnswerRe: Read signature data from APK's RSA signature file Pin
jschell30-Dec-21 7:35
Memberjschell30-Dec-21 7:35 
GeneralRe: Read signature data from APK's RSA signature file Pin
mynametaken1-Jan-22 5:53
Membermynametaken1-Jan-22 5:53 
AnswerRe: Read signature data from APK's RSA signature file Pin
Luc Pattyn30-Dec-21 7:44
sitebuilderLuc Pattyn30-Dec-21 7:44 
GeneralRe: Read signature data from APK's RSA signature file Pin
mynametaken1-Jan-22 5:56
Membermynametaken1-Jan-22 5:56 
GeneralRe: Read signature data from APK's RSA signature file Pin
Luc Pattyn1-Jan-22 5:59
sitebuilderLuc Pattyn1-Jan-22 5:59 
GeneralRe: Read signature data from APK's RSA signature file Pin
mynametaken9-Jan-22 4:37
Membermynametaken9-Jan-22 4:37 
AnswerRe: Read signature data from APK's RSA signature file Pin
jschell23-Jan-22 6:49
Memberjschell23-Jan-22 6:49 
QuestionWinform support in Windows service Pin
Member 1260803929-Dec-21 23:59
MemberMember 1260803929-Dec-21 23:59 
AnswerRe: Winform support in Windows service Pin
OriginalGriff30-Dec-21 0:27
mveOriginalGriff30-Dec-21 0:27 
GeneralRe: Winform support in Windows service Pin
Member 1260803930-Dec-21 1:28
MemberMember 1260803930-Dec-21 1:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.