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

Download a File from a URL in C# with HttpClient

November 25, 2026June 16, 2014 by turgay

Download files in C# with HttpClient, asynchronously or synchronously, with progress reporting, cancellation, and no half-written files when a download fails.

Categories C# .NET Tags asynchronous, C#, download files, synchronous, url, web 6 Comments

Convert Numbers to and from Hexadecimal in C#

November 25, 2026June 16, 2014 by turgay

Format integers as hex with the X specifier, parse hex strings back with int.Parse or Convert.ToInt32, and convert byte arrays with Convert.ToHexString.

Categories C# .NET, String Formatting Tags C#, convert, hex value, numeric Leave a comment

Find Hidden Files in a Directory in C#

November 25, 2026June 15, 2014 by turgay

List hidden files in a folder in C# with DirectoryInfo and FileAttributes, and avoid the EnumerationOptions default that skips them.

Categories C# .NET Tags C#, directory, enumerate files, hidden files, list files 2 Comments

Select XML Nodes with XPath in C#: Filters, Functions, Namespaces

November 25, 2026June 15, 2014 by turgay

XPath queries in C# with XmlDocument and XDocument: filter by position or value, use count() and sum(), and handle XML namespaces correctly.

Categories C# .NET, XML Tags C#, find in xml, select nodes, xpath Leave a comment

Commonly Used Attributes in C# and What They Do

November 25, 2026June 14, 2014 by turgay

The C# attributes you will meet most often, grouped by job: compiler hints, caller info, serialization, validation and designer metadata, with examples.

Categories C# .NET Tags attribute, C#, most useful Leave a comment
Older posts
Newer posts
← Previous Page1 … Page13 Page14 Page15 … 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