Keywords cannot be used as identifiers….. really…???

Keywords cannot be used as identifiers…..
really…???
.
.
.
in c sharp, if you want to use keywords as identifiers, you may prefix the keyword with the @ character.
.
.
.


try this…. (i hv used int keyword as identifier)
using System;

class Student
{
static void Main(string[] args)
{
int @int = 101;
Console.WriteLine(@int);

}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s