dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.27k stars 5.9k forks source link

Are there any naming rules for primary constructors? #42295

Open DmitryLukyanov opened 2 months ago

DmitryLukyanov commented 2 months ago

Type of issue

Missing information

Description

I wonder whether any naming rules are considered for primary constructors? public class Entity(Dependency dependency) vs public class Entity(Dependency _dependency) ? (refer to Private instance fields start with an underscore (_) and the remaining text is camelCased.)

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/identifier-names

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/fundamentals/coding-style/identifier-names.md

Document Version Independent Id

7f85babc-6295-21dd-f194-dede663f9966

Article author

@BillWagner

Metadata

BillWagner commented 2 months ago

Hi @DmitryLukyanov

We haven't developed these yet. It's under discussion.

I'll leave this open for future updates.