Skip to content

C# Examples

  • Home
  • About C#
    • C# Interview Questions and Answers for .NET Developers
    • Learn C#: A Practical Path Through the Examples
  • All Posts
  • Bootstrap 5 Examples
  • Contact

turgay

Binary Search Tree in C#: Add, Find, Remove and Traversals

November 25, 2026May 2, 2019 by turgay

A generic binary search tree in C# with insert, lookup, delete, height and pre-order, in-order and post-order traversal, plus when to use SortedSet instead.

Categories C# .NET, Data Structures Tags binary tree, inorder traversal, postorder traversal, preorder traversal, tree, tree traversal 13 Comments

Select, Insert, Update and Delete Data in an Access File with C#

November 25, 2026March 29, 2019 by turgay

CRUD against an Access .accdb or .mdb file from C# with OleDb: parameterised queries, getting the new AutoNumber ID, and the 32/64-bit trap.

Categories C# .NET, Databases Tags Access, Access File, C#, CRUD, database, delete, insert, mdb, select, update 2 Comments

C# Collections: Which One to Use and When

November 25, 2026March 27, 2019 by turgay

A practical guide to the C# collection types: List, Dictionary, HashSet, Queue, Stack and friends, with their costs and when to pick each one.

Categories C# .NET, Collections Tags collections Leave a comment

C# ArrayList vs Generic List: Examples and When to Use Each

November 25, 2026March 27, 2019 by turgay

How to add, find and remove items with the generic List, why it replaced ArrayList, and what to watch for when you maintain code that still uses ArrayList.

Categories C# .NET, Collections Tags array, arraylist, C#, collections, list 1 Comment

C# Stack Example: Last-In, First-Out Collections

November 25, 2026March 27, 2019 by turgay

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.

Categories C# .NET, Collections Tags collections, stack Leave a comment
Older posts
Page1 Page2 … Page21 Next →

Categories

Recent Posts

  • Select XML Nodes by Name or Attribute Value in C#
  • Binary Search Tree in C#: Add, Find, Remove and Traversals
  • Select, Insert, Update and Delete Data in an Access File with C#
  • C# Collections: Which One to Use and When
  • C# ArrayList vs Generic List: Examples and When to Use Each
  • About
  • Privacy Policy
  • Contact
© 2026 C# Examples