I am not sure why such question was asked to me and is it anywhere related to .NEt also.

Dani AI

Generated

This is a common spot-check in .NET interviews — the interviewer is usually testing whether a candidate knows naming conventions and why they matter, not just the vocabulary. already named the conventions; the useful follow-up in an interview is to show you know where and why each style is used in C# and how you would apply it on a team.

In modern .NET code the practical rules most teams follow are driven by Microsoft guidance: use PascalCase for public types and members, use camelCase for parameters and locals, and prefer an underscore-prefixed camelCase for private instance fields; interfaces get an I prefix; constants typically use PascalCase. Hungarian notation (type prefixes like iCount or bFlag) is explicitly discouraged in the Framework Design Guidelines. See the official guidance for details. (C# identifier names - Microsoft) (General naming conventions - Microsoft)

Why this matters: consistency improves readability, reduces accidental API breakage, and tooling (IntelliSense, analyzers) makes type-prefixes unnecessary. For team projects, use EditorConfig and Roslyn analyzers to enforce the chosen style so everyone follows the same rules. (Code-style naming rules - Microsoft)

Practical interview answer: confirm the terms (as did), then say where you apply them and why. Give a tiny example to show intent, for example a public property versus its private backing field:

public decimal OrderTotal { get; set; }
private decimal _orderTotal;

Also mention you would follow an existing project style or propose a migration (EditorConfig + automated rename fixes) rather than imposing changes abruptly. This shows practical, team-aware thinking beyond vocabulary.

This .NET interview question is mainly asked to test if you have used coding standards in your project. All the above three are naming conventions which are followed in programming languages to ensure a proper and neat code. Below is the explanation of each naming convention.

Pascal Notation- In this naming convention all starting letter of the words are in Upper Case and other characters are lower case.

Example:

CustomerCode

Camel Notation- In this naming convention first character of all words, except the first word are Upper Case and other characters are lower case.

Example:

customerCode

Hungarian notation - In this naming convention the variable name starts with group of small letter which indicate data type.

Example:

bCheck

( b indicates its a boolean type),

iCount

( i indicated its a integer data type)

I knew the answer it was just the vocabulary which i was not aware of. Thanks Khadak.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.