Visual Studio Notes

The name ‘ ‘ does not exist in the current context

When using C Sharp (C#) and you get the following debug error:

The name ‘  ‘ does not exist in the current context

Then you need to declare the name, i.e. define its type.

Be the first to comment - What do you think?  Posted by Capes - January 21, 2010 at 9:47 pm

Categories: Visual Studio Notes, c#   Tags:

Cannot implicitly convert type ‘int’ to ‘string’

When using C Sharp (C#) and you get the following debug error:

Cannot implicitly convert type ‘int’ to ‘string’

You need to convert the variable to string from an integer variable by the following:

Convert.ToString(XXX)

Where XXX is the integer variable that needs converting to a String type variable.

Be the first to comment - What do you think?  Posted by Capes - August 2, 2009 at 8:15 pm

Categories: Visual Studio Notes, c#   Tags: , , , , , , ,

Debug Error: Visual Studio cannot start debugging because the debug target (path to target and filename.exe) is missing. Please build the project and retry

Visual Studio cannot start debugging because the debug target (path to target and filename.exe) is missing. Please build the project and retry.

If you have deleted the startup form (usually Form1)  then you need to recreate the missing form or add a new form with the same name.

OR you could enter a new form name in substitution of Form1() in the line in your code:

Application.Run(new Form1());

Be the first to comment - What do you think?  Posted by Capes - June 25, 2009 at 11:25 pm

Categories: Visual Studio Notes   Tags: , , , ,