1. Home /
  2. Option Reference

Expression Bodies

Controls when Curb converts block-bodied members — methods, constructors, operators, local functions, accessors, properties, and indexers — to expression bodies (=>). IDE0021–IDE0027 and IDE0061.

csharp_style_expression_bodied_accessors
Convert eligible block-bodied accessors. IDE0027. Defaults to `false`
csharp_style_expression_bodied_constructors
Convert eligible block-bodied constructors to expression bodies. IDE0021. Defaults to `false`
csharp_style_expression_bodied_indexers
Convert eligible block-bodied indexers. IDE0026. Defaults to `false`
csharp_style_expression_bodied_local_functions
Convert eligible block-bodied local functions. IDE0061. Defaults to `false`
csharp_style_expression_bodied_methods
Convert eligible block-bodied methods to expression bodies. IDE0022. Defaults to `false`
csharp_style_expression_bodied_operators
Convert eligible block-bodied operators. IDE0023/IDE0024. Defaults to `false`
csharp_style_expression_bodied_properties
Convert an eligible single-getter property to an expression body. IDE0025. Defaults to `false`

No pages match your filter.

Previous
Blank Lines
Next
Usings
  • View as Markdown
  • Edit this page
  • Home

  • Why Curb
  • Getting started
    • Installation
  • Design principles
    • Conformance
    • Conformance divergences
    • Performance
    • Reflow
    • Safety
    • AI coding agents
    • Working with existing tooling
    • Syntax and semantic passes
  • Integrations
    • The build integration
    • Cleanup
    • Agent instructions
  • Why not X?
    • CSharpier
    • dotnet format
    • Rider / ReSharper
    • EditorConfig analyzers
  • Option Reference
    • Core
    • New Lines
    • Indentation
    • Spacing
    • Wrapping
    • Blank Lines
    • Expression Bodies
    • Usings
    • Modifiers and Braces
    • Trailing Commas
    • Suppression
  • Known limitations
  • Benchmarks
    • Churn