Interfaces must start by capital I
public interface IDataService
{
public Task SendData(DataModel model);
}
We use PascalCase for:
- classes’ name
- methods’ name
public
variables
We use CamelCase for:
private
orinternal
field names (they must include the prefix_
)- methods’ paramters
public class DataService
{
const int TAX = 7;
public bool IsValid { get; private set; };
private IWorkerQueue _workerQueue;
public async Task SendData(DataModel model)
{
string someValue = "";
// ... whatever
}
}
async
methods must end by Async
public async Task<string> GetUrlAsync()
{
// ... whatever
}
Reference(s)
https://learn.microsoft.com/es-es/dotnet/csharp/fundamentals/coding-style/identifier-names