C# Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 231 Page Views: 

I want to declare a variable naming checked, but it gives an error Why?



Posted By: Avi Date: 1 October 2010 11:30:31 AM
 Answer:

This is because checked is a keyword in C# and keywords can't be used as a variable name.


Posted By: avibtech


Date: 1 October 2010 11:30:31 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image eBlVDz
Related Questions
C# : How do download a web page from c#?

How do download a web page from c#?

use HttpWebRequest object to obtain WebResponse object and response stream from it.
Category: C# Date: 10/14/2010 9:53:31 AM
C# : How do you subscribe to the event?

How do you subscribe to the event?

this.Load += new System.EventHandler(this.Form1_Load);
Category: C# Date: 10/14/2010 9:30:14 AM
C# : What is dynamic keyword?

What is dynamic keyword?

Dynamic type bypas compile-time checking of method calls, instead these operations are resolved at r....
Category: C# Date: 10/14/2010 9:27:31 AM
C# : Can you use dll created in VB.NET in C# application?

Can you use dll created in VB.NET in C# application?

Yes
Category: C# Date: 10/14/2010 9:23:47 AM
C# : Will this code compile:
class A { private static int Field; }
class B { int Method() { return A.Field;} }

Will this code compile: class A { private static int Field; } class B { int Method() { return A.Fiel....

No. Field is inaccessible due to its protection level
Category: C# Date: 10/14/2010 8:09:31 AM