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#

Copy One Stream to Another in C#

November 25, 2026June 13, 2014 by turgay

Copy data between streams in C# with CopyTo and CopyToAsync, report progress, and avoid the position mistake that produces empty output.

Categories C# .NET Tags C#, copy stream Leave a comment

Get a List of Files in a Directory in C#

November 25, 2026June 13, 2014 by turgay

List files in a folder in C# with Directory.GetFiles and EnumerateFiles: filter by extension, search subfolders and skip folders you cannot read.

Categories C# .NET Tags C#, directory, get files Leave a comment

Send an Email Through the Outlook Desktop App in C#

November 25, 2026June 13, 2014 by turgay

Create, display or send an Outlook email with attachments from C# using COM interop, plus the traps: new Outlook, security prompts and releasing COM objects.

Categories C# .NET Tags attachment, C#, mail, outlook, send 1 Comment

LINQ Examples in C#: Filter, Group, Sort and Project

November 25, 2026June 12, 2014 by turgay

Practical LINQ examples in C# for filtering, grouping, sorting and projecting data, in both method and query syntax, plus the deferred execution traps.

Categories C# .NET, LINQ Tags C#, example, groupby, linq, where Leave a comment

Format a Double in C#: Decimal Places, Padding and Culture

November 25, 2026June 12, 2014 by turgay

Format a double with a fixed or maximum number of decimal places, leading zeros and thousands separators in C#, and avoid the culture and rounding traps.

Categories C# .NET, String Formatting Tags C#, double, string formatting Leave a comment
Older posts
Newer posts
← Previous Page1 … Page14 Page15 Page16 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