Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jerviscui committed May 24, 2024
1 parent cb99aa0 commit 57c0b98
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/Tests/CodeAnalysisTest/OrganizeMembersTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace CodeAnalysisTest;

public class OrganizeMembersTest
{
// IDE0001 dotnet_style_predefined_type_for_locals_parameters_members = true
private int _id;

// IDE0001 dotnet_style_predefined_type_for_locals_parameters_members = true
public int ID
{
get => _id;
set => _id = value;
}

// IDE0001 dotnet_style_predefined_type_for_locals_parameters_members = true
public void Display()
{
throw new NotImplementedException();
}

// IDE0001 dotnet_style_predefined_type_for_locals_parameters_members = true
public event EventHandler MyEvent;

// IDE0001 dotnet_style_predefined_type_for_locals_parameters_members = true
private static bool Test()
{
// ide0007 csharp_style_var_for_built_in_types = true
int x = 5;
int y = x;

// ide0007 csharp_style_var_when_type_is_apparent = true
MyClass obj = new MyClass();
var yy = obj.Age;

// ide0007 csharp_style_var_elsewhere = true
bool f = Random.Shared.Next() > 1;
var yyy = f;

return true;
}
}

0 comments on commit 57c0b98

Please sign in to comment.