ConfigurationIgnoreAttribute in .NET 11
Read OriginalThis article introduces the ConfigurationIgnoreAttribute in .NET 11, a new feature in Microsoft.Extensions.Configuration that allows developers to mark properties in options classes as ignored by the configuration binder. Previously, workarounds like using ConfigurationKeyNameAttribute with garbage keys were needed. The attribute solves common scenarios like post-processed properties or parsed representations of raw values. It also clarifies that JsonIgnoreAttribute does not affect configuration binding. A practical example with CsvIngestionOptions demonstrates usage.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser
Top of the Week
No top articles yet