Difference between Identifier and Keyword in C#      S.No    Identifier                         Keyword      1       Meani...
http://csharp.2000things.com/2011/12/13/474-you-can-include-unicode-characters-in-your-source-code/http://searchwindevelop...
Upcoming SlideShare
Loading in …5
×

Difference between identifier and keyword

4,477 views
4,117 views

Published on

Difference between Identifier and Keyword

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
4,477
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
40
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Difference between identifier and keyword

  1. 1. Difference between Identifier and Keyword in C# S.No Identifier Keyword 1 Meaning: Meaning: A C# identifier is a name given Keywords are predefined reserved to a class, delegate, interface, identifiers that have special method, namespace or meanings to the compiler. variable. 2 What it consists of ? What it consists of ? Must be any combination of Must be only letters. letters, numbers, and underscores. 3 Upper case / Lower case / Upper case / Lower case / Both ? Both ? Most of the keywords are Allows both Uppercase and Lowercase.But,only Namespaces, Lowercase. Types and Members have their first character in uppercase. 4 Whether Unicode characters Whether Unicode characters are are allowed or not ? allowed or not ? Identifiers can begin with an Unicode characters are not used in allowed Unicode character or any C# keywords an underline. But,we need to use nonformatting Unicode characters in any part of an identifier. i.e., u0027format // error – Unicode formatting character which is not allowed. 5 Whether it can be used to Whether it can be used to name name classes, methods, or classes, methods, or variables ? variables ? We cannot use keywords for The purpose of Identifier is to naming classes, methods, or provide names to variables. namespaces, classes, methods, variables, and interfaces.Note: Keywords cannot be used as identifiers in your program unless they include the "at"sign (@) as a prefix. For example, @new would be a legal identifier; but, new is not,because it is a keyword.References:http://www.dotnetspider.com/forum/161699-Are-C-Keywords-lowercase-or-uppercase.aspxhttp://www.dotnetuncle.com/csharp/161-csharp-keywords-case.aspx
  2. 2. http://csharp.2000things.com/2011/12/13/474-you-can-include-unicode-characters-in-your-source-code/http://searchwindevelopment.techtarget.com/tip/Identifiers-and-keywords-in-Chttp://www.codeguru.com/columns/csharp_learning/article.php/c6753/C-FAQ-16--What-are-Identifiers-and-Keywords.htmhttp://msdn.microsoft.com/en-us/library/x53a06bb%28v=vs.80%29.aspxhttp://en.csharp-online.net/Appendix_C._CSharp_KeywordsAnd, further updates on difference between questions and answers, please visit myblog @ http://onlydifferencefaqs.blogspot.in/

×