.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> C# >> Post New Question Subscribe to Interview Questions

Why do I get a syntax error when trying to declare a variable called checked?

Posted By :nishithraj     Posted Date :November 30, 2009    Points :10   Category :C# 
The word checked is a keyword in C#.

You can also find related Interview Question to Why do I get a syntax error when trying to declare a variable called checked?  below: 

I was trying to use an "out int" parameter in one of my functions. How should I declare the variable that I am passing to it?

  
You should declare the variable as an int, but when you pass it in you must specify it as 'out', like the following: int i; foo(out i); where foo is declared as follows: [return-type] foo(out int o) { } (More...)

Why do I get an error (CS1006) when trying to declare a method without specifying a return type?

  
If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following is an example: // This results in a CS1006 error public static staticMethod (mainStatic obj) // This will work as wanted public static void staticMethod (mainStatic obj) (More...)

Is it Possible to declare an array variable without initialization?

  
Yes. It is possible .Use "New" keyword.
Eg:
int[] myArray;
myArray = new int[] {1,3,5,7,9}; (More...)

Does omitting the parenthesis make the syntax cleaner?

  
Yes, if "cleaner" to you is fewer characters on the screen. No, if "cleaner" to you is something that appeals to the sense of logic and reason. (More...)

I thought destructors didn't exist in C#.Why can I declare one?

  
You can declare a method that looks like a C++ destructor such as ~Employee(). But it really becomes a shorthand way to define System.Object.Finalize.The Finalize method is not the same as a C++ destructor.A short explanation is that C++ destructors are called when the call stack unwinds.The Finalize method will be called when the garbage collector of the CLR is ready to destroy the object. (More...)

What does this error mean:
System.ArgumentOutOfRangeException: Index was out of range : Upgrading CRM 3.0

  
Error Message : "System.ArgumentOutOfRangeException: Index was out of range", occurs while upgrading Microsoft Dynamics CRM 3.0 to Microsoft Dynamics CRM 4.0

Solution : The problem occurs if an ampersand is in the subject of an activity that was created in a sales process or in a workflow rule. So, remove the ampersand.

To obtain this fix, use the Update Installation Files option during Microsoft Dynamics CRM 4.0 setup




For more details, visit http://kbalertz.com/Feedback.aspx?kbNumber=948917/ (More...)

How to remove a Session variable?

  
using HttpSessionState.Remove(); (More...)

Select Syntax

  
SELECT "COLUMN_NAME" FROM "TABLE_NAME" (More...)

What is DISTINCT Syntax ?

  
SELECT DISTINCT "COLUMN_NAME" FROM "TABLE_NAME" (More...)

What is a WHARE Syntax?

  
SELECT "COLUMN_NAME" FROM "TABLE_NAME" WHERE "CONDITION"

This condition can be a simple condition and no limit to the number of simple conditions. (More...)

What is COMPOUND CONDITION Syntax?

  
SELECT "COLUMN_NAME" FROM "TABLE_NAME" WHERE "SIMPLE CONDITION" {[AND|OR] "SIMPLE CONDITION"};


Example:
SELECT EMPLOYEE FROM SALARY_TABLE WHERE SALARY > 23000
OR (SALARY < 6000 AND SALARY > 4000) (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend