C# Stack Example: Last-In, First-Out Collections
How to push, pop and peek with the generic Stack in C#, avoid the empty-stack exception with TryPop, and use a stack to check balanced brackets.
How to push, pop and peek with the generic Stack in C#, avoid the empty-stack exception with TryPop, and use a stack to check balanced brackets.
How to enqueue, dequeue and peek with the generic Queue in C#, when to use PriorityQueue or ConcurrentQueue instead, and how the legacy Queue class differs.
Store and look up key-value pairs with the generic Dictionary in C#, and what to know about the legacy Hashtable when you maintain older code.
Async CRUD against MySQL from C# with MySqlConnector: parameterised queries, reading rows, getting the new ID and using a transaction.
Read the position and size of any window, including other applications’ windows, with the GetWindowRect API in C#, plus the DPI and border traps.