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#

Set GDAL_DATA and Other GDAL Paths Programmatically in C#

November 25, 2026June 13, 2014 by turgay

Point GDAL at its data and plugin folders from C# with Gdal.SetConfigOption or environment variables, and why the order of calls matters.

Categories C# .NET Tags C#, environment variable, gdal Leave a comment

Zip and Unzip Files in C# with System.IO.Compression

November 25, 2026June 13, 2014 by turgay

Create and extract zip files in C# with ZipFile and ZipArchive: zip folders or file lists, build zips in memory and extract safely.

Categories C# .NET, Files and I/O Tags C#, compression, unzip, zip 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
Older posts
Newer posts
← Previous Page1 … Page13 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