---
title: "Identifiers in c#"  
description: "Identifiers are tokens or symbols which are uniquely identify the element. They are names of things like variables or fields. Identifiers are names gi"  
author: "Amit Singh"  
published: 2011-01-08  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/91/identifiers-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Identifiers in c#

Identifiers are tokens or [symbols](https://answers.mindstick.com/qa/47619/explain-briefly-about-the-symbols-and-colours-on-drawings) which are uniquely [identify](https://www.mindstick.com/forum/159425/java-app-crash-arrayindexoutofboundsexception-identify-invalid-index) the element. They are names of things like [variables](https://www.mindstick.com/articles/715/php-variables) or fields. Identifiers are names given to [namespaces](https://www.mindstick.com/forum/155583/what-are-namespaces-in-c-sharp), classes, [methods](https://www.mindstick.com/articles/13060/runny-nose-remedy-methods-that-work-best), variables, and [interfaces](https://www.mindstick.com/articles/12100/interfaces-in-java-real-life-example) etc. Identifiers in c# are case sensitive. For example abc is not equal to ABC. Identifiers can be combination of letters, numbers, and underscores. [Keywords](https://www.mindstick.com/articles/12899/how-to-spot-if-you-re-optimizing-for-the-wrong-keywords) are not defined as identifiers. It can make the identifiers by using [Unicode](https://www.mindstick.com/blog/49/unicode-character-string-datatypes) [character](https://www.mindstick.com/articles/23551/an-investigate-distinctive-seafood-restaurant-for-your-image-stamp-character) as “@”.\

For example

int @int=10;

##### Valid identifiers in C# are following this rule

##### \

##### · An identifier must start with a letter or an underscore.

##### \
· After the first character, it may contain numbers, letters, connectors,

##### \

##### etc.

##### \
· If the identifier is a keyword, it must be prep ended with “@” .

##### \

For Example:

\

##### The following names are valid identifiers in C#:

\

1. WORLD

2. world

3. w_orld

4. HelloWorld

5. Z

6. Z

7. \u098world

8. @public

9. _world

\

##### And some invalid identifiers

\

1. 2world //error because first letter is number

2. Public //error because it is [keyword](https://www.mindstick.com/forum/33572/sql-inner-join-keyword)

3. \u0027format // error because Unicode formatting character

---

Original Source: https://www.mindstick.com/blog/91/identifiers-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
