Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 739 Bytes

File metadata and controls

41 lines (28 loc) · 739 Bytes
layout page
title CC0038
tagline ConvertToExpressionBodiedMemberAnalyzer

|TypeName|ConvertToExpressionBodiedMemberAnalyzer | |Check Id | CC0038 | |Category | Style | |Severity | Hidden |

Cause

Usage of an expression-bodied members improve readability of the code.

Example

{% highlight csharp %} public override string ToString() { return this.Name; } {% endhighlight %}

Code fix

A code fix will be presented to you that will transform the code, it will convert the method or property into an expression-bodied function.

{% highlight csharp %} public override string ToString() => this.Name; {% endhighlight %}

![Code fix]({{ BASE_PATH }}/assets/images/CC0038/codefix0.png)

Related rules

TBD

See also

TBD