C#idiomatic C#
core-library126 pages

idiomatic C#

Core library

The base class library that C# idiom is built on: strings, equality, collections, generics, memory, events.

  1. Apply attributes 03/02/2026
  2. Extend metadata using attributes 10/14/2020
  3. Retrieving Information Stored in Attributes 08/05/2022
  4. Write custom attributes 03/02/2026
  5. Automatic Memory Management 03/30/2017
  6. Alternation Constructs in Regular Expressions 03/30/2017
  7. Anchors in Regular Expressions 03/30/2017
  8. Backreference Constructs in Regular Expressions 03/30/2017
  9. Backtracking in regular expressions 08/11/2023
  10. How to: Perform Basic String Manipulations in .NET 03/30/2017
  11. Best practices for displaying and persisting formatted data 05/01/2019
  12. Best practices for regular expressions in .NET 06/11/2024
  13. Best practices for comparing strings in .NET 02/23/2026
  14. Change case in .NET 08/11/2021
  15. Character classes in regular expressions 09/08/2025
  16. Character encoding in .NET 10/22/2024
  17. How to use character encoding classes in .NET 08/11/2021
  18. Character Escapes in Regular Expressions 03/30/2017
  19. Choosing between anonymous and tuple types 07/01/2020
  20. Common type system 01/03/2024
  21. Compare strings in .NET 03/30/2017
  22. Compilation and reuse in regular expressions 06/11/2024
  23. Composite formatting 10/22/2025
  24. Type conversion tables in .NET 03/30/2017
  25. Create new strings in .NET 03/16/2026
  26. Custom date and time format strings 05/12/2022 CSharp · VB
  27. Custom numeric format strings 06/25/2018
  28. Custom TimeSpan format strings 03/30/2017
  29. Details of regular expression behavior 03/30/2017
  30. Extract substrings from a string 03/20/2026
  31. Enumeration format strings 06/19/2023
  32. Overview: How to format numbers, dates, enums, and other types in .NET 10/22/2025
  33. Grouping constructs in regular expressions 04/05/2023
  34. How to: Define and Use Custom Numeric Format Providers 03/30/2017
  35. How to: Display Dates in Non-Gregorian Calendars 03/30/2017
  36. How to: Display milliseconds in date and time values 08/01/2022
  37. How to: Extract a Protocol and Port Number from a URL 06/30/2020
  38. How to: Extract the Day of the Week from a Specific Date 08/09/2022
  39. How to: Pad a Number with Leading Zeros 07/26/2022
  40. How to: Round-trip Date and time values 11/15/2022
  41. How to: Strip Invalid Characters from a String 06/30/2020
  42. How to verify that strings are in valid email format 08/01/2022
  43. Miscellaneous Constructs in Regular Expressions 03/30/2017
  44. Pad strings in .NET 03/15/2018
  45. Parse date and time strings in .NET 01/16/2026
  46. Parsing numeric strings in .NET 07/27/2022
  47. Parse other strings in .NET 03/30/2017
  48. Parse strings in .NET 03/30/2017
  49. Quantifiers in Regular Expressions 08/09/2022
  50. Regular Expression Example: Changing Date Formats 06/30/2020
  51. Regular expression example: Scanning for HREFs 07/14/2021
  52. Regular Expression Language - Quick Reference 02/03/2021
  53. Regular expression options 06/02/2022
  54. .NET regular expression source generators 10/20/2025
  55. .NET regular expressions 03/18/2026
  56. Standard date and time format strings 04/05/2023
  57. Standard numeric format strings 10/22/2024
  58. Standard TimeSpan format strings 03/30/2017
  59. Using the StringBuilder Class in .NET 03/30/2017
  60. Substitutions in Regular Expressions 03/30/2017
  61. The regular expression object model 03/30/2017
  62. Trim and remove characters from strings in .NET 07/22/2022
  63. Type conversion in .NET 03/30/2017
  64. Commonly used collection types 06/09/2021
  65. Comparisons and sorts within collections 04/30/2020
  66. Hashtable and Dictionary Collection Types 03/30/2017
  67. Collections and Data Structures 10/20/2025
  68. Selecting a Collection Class 03/18/2019
  69. Sorted Collection Types 04/30/2020
  70. BlockingCollection Overview 03/30/2017
  71. How to add and remove items from a ConcurrentDictionary 05/04/2020
  72. How to: Add and Take Items Individually from a BlockingCollection 03/30/2017
  73. How to: Add Bounding and Blocking Functionality to a Collection 03/30/2017
  74. Create an object pool by using a ConcurrentBag 05/01/2020
  75. How to: Use Arrays of Blocking Collections in a Pipeline 03/30/2017
  76. Use foreach to remove items in a BlockingCollection 05/04/2020
  77. Thread-safe collections 10/21/2025
  78. When to use a thread-safe collection 03/30/2017
  79. When to use generic collections 04/30/2020
  80. Delegates and lambdas 06/20/2016
  81. Declare multiple events using event properties 03/25/2026
  82. How to implement a provider 06/01/2026
  83. How to implement an observer 06/01/2026
  84. Raise and consume events 03/24/2026
  85. Handle and raise events 03/23/2026
  86. Best practices for the observer design pattern 06/01/2026
  87. Observer design pattern 10/20/2025
  88. Best practices for exceptions 10/22/2025
  89. Exception class and properties 03/30/2017
  90. Handling COM Interop Exceptions 03/30/2017
  91. How to create user-defined exceptions with localized exception messages 07/31/2024
  92. How to create user-defined exceptions 08/10/2022
  93. How to explicitly throw exceptions 03/30/2017
  94. How to use finally blocks 03/30/2017
  95. How to use specific exceptions in a catch block 03/30/2017
  96. How to use the try/catch block to catch exceptions 02/06/2019
  97. Handling and throwing exceptions in .NET 06/19/2018
  98. Use user-filtered exception handlers 12/14/2020
  99. Application Domain Resource Monitoring 03/30/2017
  100. Background garbage collection 04/21/2020
  101. Dynamic adaptation to application sizes (DATAS) 08/09/2024
  102. Fundamentals of garbage collection 10/22/2025
  103. Implement a Dispose method 10/22/2025
  104. Implement a DisposeAsync method 10/20/2025
  105. Garbage collection 04/21/2020
  106. Induced Collections 03/30/2017
  107. The large object heap on Windows systems 11/11/2021
  108. Latency modes 03/30/2017
  109. Garbage collection notifications 03/30/2017
  110. Optimization for Shared Web Hosting 03/30/2017
  111. Garbage collection and performance 07/08/2022
  112. Cleaning up unmanaged resources 08/20/2021
  113. Using objects that implement IDisposable 05/18/2021
  114. Weak References 03/30/2017
  115. Workstation and server garbage collection 04/21/2020
  116. Generic types overview 10/09/2018
  117. Generic collections in .NET 02/15/2018
  118. Covariance and contravariance in generics 03/09/2026
  119. Generic Delegates for Manipulating Arrays and Lists 03/30/2017
  120. Generics in .NET 07/26/2022
  121. Generic interfaces in .NET 07/25/2022
  122. Generic math 08/12/2022
  123. Memory-related and span types 07/12/2024
  124. Memory<T> and Span<T> usage guidelines 04/09/2025
  125. Unsafe code best practices 09/17/2025
  126. Value tuples 01/03/2024