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

Create a New Thread With or Without a Parameter in C#

November 25, 2026June 13, 2014 by turgay

Start a Thread in C# with and without a parameter, pass typed arguments with a lambda, and see why Task.Run is usually the better choice.

Categories C# .NET Leave a comment

Generic XML Serialization in C# with XmlSerializer

November 25, 2026June 13, 2014 by turgay

A small generic helper that serializes any C# object to XML and back with XmlSerializer, plus the rules your classes must follow and the traps to avoid.

Categories C# .NET Tags C#, xml serialize, xml serializer Leave a comment

Encrypt and Decrypt Streams in C# with AES

November 25, 2026June 13, 2014 by turgay

Encrypt and decrypt files and streams in C# with AES, a password-derived key and a random IV, and when to switch to authenticated encryption with AesGcm.

Categories C# .NET Tags AES, C#, crypto, decrypt, encrypt, RijndaelManaged, TripleDES 2 Comments

IStream in C#: Wrap COM Streams and .NET Streams

November 25, 2026June 13, 2014 by turgay

Two small adapters between COM’s IStream and .NET’s Stream: read a COM IStream as a Stream, and pass any .NET Stream to a COM API that expects IStream.

Categories C# .NET, Files and I/O Tags C#, managed istream, stream Leave a comment

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
Older posts
Newer posts
← Previous Page1 … Page15 Page16 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