tagged [naming]

What does the @ symbol before a variable name mean in C#?

What does the @ symbol before a variable name mean in C#? I understand that the @ symbol can be used before a string literal to change how the compiler parses the string. But what does it mean when a ...

What's the name for hyphen-separated case?

What's the name for hyphen-separated case? This is PascalCase: `SomeSymbol` This is camelCase: `someSymbol` This is snake_case: `some_symbol` So my questions is whether there is a widely accepted name...

Is there a naming convention for git repositories?

Is there a naming convention for git repositories? For example, I have a RESTful service called Purchase Service. Should I name my repository: 1. purchaserestservice 2. purchase-rest-service 3. purcha...

8 Feb at 15:10

Resource (.resx) file Key naming conventions?

Resource (.resx) file Key naming conventions? I'm building a C# app that will likely contain a couple resource files to store strings for use in language translation. I'm trying to come up with a nami...

Naming conventions in C# compared to Java

Naming conventions in C# compared to Java The standard naming convention in the Java world is to name packages, classes and methods according to: What is the C#/.NET standard naming convention for the...

24 Jan at 19:1

C# Variable Name "_" (underscore) only

C# Variable Name "_" (underscore) only I was just hit with a minor issue in C#, it was just a copy-paste mistake but don't know how C# accept it. This code gets compiled successfully...HOW Is there an...

25 Feb at 09:0

Why are exclamation marks used in Ruby methods?

Why are exclamation marks used in Ruby methods? In Ruby some methods have a question mark (`?`) that ask a question like `include?` that ask if the object in question is included, this then returns a ...

Should I use Singular or Plural name convention for REST resources?

Should I use Singular or Plural name convention for REST resources? Some RESTful services use different resource URIs for update/get/delete and Create. Such as - - - I'm little bit confused about this...

28 Dec at 23:52

What does "o" mean as a variable prefix?

What does "o" mean as a variable prefix? in oCn? What is the rule? I found that type of naming in this article [http://msdn.microsoft.com/en-us/magazine/cc163799.aspx](http://msdn.microsoft.com/en-us/...

23 Feb at 20:14

What are the type parameter naming guidelines?

What are the type parameter naming guidelines? I noticed, as well as saw in the [Essential C# 3.0](https://rads.stackoverflow.com/amzn/click/com/0321533925) book, that paramters are usually defined as...

21 Apr at 03:15

Private Static Readonly Field Capitalization

Private Static Readonly Field Capitalization Pascal or camel case? I name private fields and private static fields using camel case. I name consts (as suggested by MS naming conventions) with pascal c...

2 Jan at 06:2

LINQ: Why is it called "Comprehension Syntax"

LINQ: Why is it called "Comprehension Syntax" Why is the [following LINQ syntax](http://rthumati.wordpress.com/category/net/02-data-access/linq/) (sometimes called "query" syntax) called "comprehensio...

3 Jun at 15:32

Node.js project naming conventions for files & folders

Node.js project naming conventions for files & folders What are the naming conventions for files and folders in a large Node.js project? Should I capitalize, camelCase, or under-score? Ie. is this con...

What is the convention for word separator in Java package names?

What is the convention for word separator in Java package names? How should one separate words in package names? Which of the following are correct? 1. com.stackoverflow.my_package (Snake Case using u...

30 Dec at 13:7

Microsoft VB.NET naming convention

Microsoft VB.NET naming convention Is there any standard naming convention for VB.NET ? Based your programming experiences, would like to share your naming convention for VB.NET ? Are there any guides...

6 Apr at 16:33

Value to assign to 'paramName' parameter for ArgumentException in C# property setter?

Value to assign to 'paramName' parameter for ArgumentException in C# property setter? If an invalid value is passed to a property setter and an `ArgumentException` (or possibility a class derived from...

2 Feb at 13:32

In an OO language, what do you name your class that contains the Main method?

In an OO language, what do you name your class that contains the Main method? For instance in C# or Java, you always have a main() method used to get your program running. What do you name the class t...

20 Jan at 16:43

Why prefix C# interface names with an “I”

Why prefix C# interface names with an “I” What is the rationale behind this naming convention? I don't see any benefit. The extra prefix just pollutes the API. My thinking is inline with Konrad's [res...

23 May at 11:54

Design Pattern Nomenclature & Clarification: Provider, Service, Broker

Design Pattern Nomenclature & Clarification: Provider, Service, Broker Can someone define for me the conceptual difference is between a Provider, Service and Broker? I regularly write MVC apps and off...

ReSharper C# naming style for private methods and properties

ReSharper C# naming style for private methods and properties I like to make the first letter of private methods, properties and events lowercase and the first letter of public methods, properties and ...

Variable naming for arrays/lists/collections - C#

Variable naming for arrays/lists/collections - C# What should I call a variable instantiated with some type of array? Is it okay to simply use a pluralised form of the type being held? `IList people =...

24 May at 15:45

What is the accepted pattern for naming methods that return Tasks?

What is the accepted pattern for naming methods that return Tasks? APM uses BeginXXX/EndXX pairs and the Event-based Asynchronous Pattern ([EAP](http://msdn.microsoft.com/en-us/library/wewwczdw.aspx))...

2 Jun at 22:10

Naming convention for a C# Dictionary

Naming convention for a C# Dictionary How do we name a dictionary variable? Say in my method I have `Dictionary> dictionary;`, where the keys of the `dictionary` are country names and the values are l...

18 Jul at 08:27

Code style for private methods in C#

Code style for private methods in C# I just found out, that it seems a common pattern to use `UpperFirstLetterPascalCase()` for private methods. I for myself, find this completely inconsistent with na...

14 Feb at 21:32

How do I name an interface when the base word starts with an I?

How do I name an interface when the base word starts with an I? I want to create an interface for "Items". Typicaly I would name an interface by adding and "I" prefix to a base word. But in this case ...

26 Aug at 05:39