Click here to Skip to main content
15,894,291 members
Home / Discussions / C#
   

C#

 
GeneralRe: Read information from serial port in Mathlab format Pin
Luc Pattyn6-Apr-24 8:16
sitebuilderLuc Pattyn6-Apr-24 8:16 
GeneralRe: Read information from serial port in Mathlab format Pin
Victor Gonzalez 20247-Apr-24 1:12
Victor Gonzalez 20247-Apr-24 1:12 
GeneralRe: Read information from serial port in Mathlab format Pin
Luc Pattyn7-Apr-24 1:52
sitebuilderLuc Pattyn7-Apr-24 1:52 
GeneralRe: Read information from serial port in Mathlab format Pin
Victor Gonzalez 20247-Apr-24 6:04
Victor Gonzalez 20247-Apr-24 6:04 
GeneralRe: Read information from serial port in Mathlab format Pin
Luc Pattyn7-Apr-24 8:13
sitebuilderLuc Pattyn7-Apr-24 8:13 
GeneralRe: Read information from serial port in Mathlab format Pin
Victor Gonzalez 20247-Apr-24 9:53
Victor Gonzalez 20247-Apr-24 9:53 
GeneralRe: Read information from serial port in Mathlab format Pin
Luc Pattyn7-Apr-24 11:04
sitebuilderLuc Pattyn7-Apr-24 11:04 
GeneralRe: Read information from serial port in Mathlab format Pin
Victor Gonzalez 20247-Apr-24 22:42
Victor Gonzalez 20247-Apr-24 22:42 
GeneralRe: Read information from serial port in Mathlab format Pin
Luc Pattyn7-Apr-24 22:45
sitebuilderLuc Pattyn7-Apr-24 22:45 
QuestionDebugging the Sandbox Pin
Richard Andrew x645-Apr-24 3:43
professionalRichard Andrew x645-Apr-24 3:43 
QuestionIParsable? IFormattable? ICustomFormatter? IFormatProvider? TryParse! ToString! Pin
Tracy Dryden24-Mar-24 12:29
Tracy Dryden24-Mar-24 12:29 
AnswerRe: IParsable? IFormattable? ICustomFormatter? IFormatProvider? TryParse! ToString! Pin
Mycroft Holmes24-Mar-24 15:07
professionalMycroft Holmes24-Mar-24 15:07 
GeneralRe: IParsable? IFormattable? ICustomFormatter? IFormatProvider? TryParse! ToString! Pin
Tracy Dryden24-Mar-24 16:19
Tracy Dryden24-Mar-24 16:19 
AnswerRe: IParsable? IFormattable? ICustomFormatter? IFormatProvider? TryParse! ToString! Pin
Ralf Meier24-Mar-24 22:35
mveRalf Meier24-Mar-24 22:35 
GeneralRe: IParsable? IFormattable? ICustomFormatter? IFormatProvider? TryParse! ToString! Pin
Tracy Dryden25-Mar-24 7:51
Tracy Dryden25-Mar-24 7:51 
AnswerRe: IParsable? IFormattable? ICustomFormatter? IFormatProvider? TryParse! ToString! Pin
jschell26-Mar-24 12:00
jschell26-Mar-24 12:00 
Rant(Current) AI Rant. Pin
Gerry Schmitz17-Mar-24 12:29
mveGerry Schmitz17-Mar-24 12:29 
Me, wanting to "peek" the "last" entry in a ConcurrentQueue, because the "next" entry I will enqueue needs "prior info" if it exists.

I can use ToArray, and GetEnumerator. Surprising .Last() compiles but I thought I'd "Bing" anyway.

Me: peek last entry in concurrentqueue
Copilot with GPT-4:
Quote:
Certainly! In C#, if you want to peek at the last entry in a ConcurrentQueue, you can use the TryPeek method. Here’s an example:

(Some "wrong" / right code).
Quote:
In this example, the TryPeek method allows you to examine the last item in the queue without removing it. If the queue is empty, it returns false, and you can handle that case accordingly.
If you have any more questions or need further assistance, feel free to ask! 😊

MSDN re: TryPeek:
Quote:
Tries to return an object from the beginning of the ConcurrentQueue<t> without removing it.


Seems it can't differentiate a queue from a stack. Nice. VS is also getting more "aggressive" when it's getting it wrong.


"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

GeneralRe: (Current) AI Rant. Pin
Eddy Vluggen26-Mar-24 5:34
professionalEddy Vluggen26-Mar-24 5:34 
GeneralRe: (Current) AI Rant. Pin
lmoelleb1-Apr-24 21:44
lmoelleb1-Apr-24 21:44 
GeneralRe: (Current) AI Rant. Pin
lmoelleb1-Apr-24 21:49
lmoelleb1-Apr-24 21:49 
QuestionMessageBox Appearing Behind Window Pin
Richard Andrew x6417-Mar-24 1:27
professionalRichard Andrew x6417-Mar-24 1:27 
AnswerRe: MessageBox Appearing Behind Window Pin
OriginalGriff17-Mar-24 4:33
mveOriginalGriff17-Mar-24 4:33 
AnswerRe: MessageBox Appearing Behind Window Pin
Gerry Schmitz17-Mar-24 6:37
mveGerry Schmitz17-Mar-24 6:37 
GeneralRe: MessageBox Appearing Behind Window Pin
Richard Andrew x6417-Mar-24 8:04
professionalRichard Andrew x6417-Mar-24 8:04 
GeneralRe: MessageBox Appearing Behind Window Pin
Gerry Schmitz17-Mar-24 10:09
mveGerry Schmitz17-Mar-24 10:09 

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.