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

C# .NET

Optional Parameters and Named Arguments in C#

November 25, 2026September 9, 2014 by turgay

How to declare optional parameters with default values in C#, call them with named arguments, and avoid the versioning trap that comes with them.

Categories C# .NET Tags C#, C# 4.0, optional argument, optional parameter Leave a comment

The dynamic Type in C#: How It Works and When to Use It

November 25, 2026September 9, 2014 by turgay

What the dynamic keyword does in C#, how it differs from var and object, where it is still useful, and why most modern code avoids it.

Categories C# .NET Tags C#, C# 4.0, dynamic type Leave a comment

Regular Expressions in C#: Examples and Syntax Cheat Sheet

November 25, 2026September 9, 2014 by turgay

Match, extract, replace and split text with Regex in C#, use source-generated regex in .NET 7+, and look up the pattern syntax in one table.

Categories C# .NET Tags C#, metacharacters, operators, quantifiers, RegEx, regular expressions, regular expressions metacharacters Leave a comment

Take a Screenshot in C#: Full Screen, All Monitors or One Window

November 25, 2026September 8, 2014 by turgay

Capture the primary screen, every monitor or a single form in C# with Graphics.CopyFromScreen, and avoid the DPI scaling trap that crops screenshots.

Categories C# .NET Tags C#, taking screenshot 2 Comments

Fast Image Processing in C# with LockBits, Span and Parallel.For

November 25, 2026September 3, 2014 by turgay

Why Bitmap.GetPixel and SetPixel are slow, and how to process pixels hundreds of times faster with LockBits, Span and Parallel.For in C#.

Categories C# .NET Tags bitmap pixel acess, C#, C# image processing, fast bitmap access, fast image manipulation, fast image processing, image processing, image procession performance, parallel bitmap processing, unsafe bitmap access 30 Comments
Older posts
Newer posts
← Previous Page1 … Page3 Page4 Page5 … Page17 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