Show/Hide Toolbars

XSharp

The name 'identifier' does not exist in the current context

 

An attempt was made to use a name that does not exist in the class, namespace, or scope. Check the spelling of the name and check your using directives and assembly references to make sure that the name that you are trying to use is available.

 

This error frequently occurs if you declare a variable in a loop or a try or if block and then attempt to access it from an enclosing code block or a separate code block, as shown in the following example.

 

 

// XS0103.prg

 

The following example resolves the error.