Cry about...
MS-Windows Troubleshooting


Error: 'LabelLayer' is not accessible in this context because it is private


Symptom:

Compilation error:

Error: 'LabelLayer' is not accessible in this context because it is private.

The actual class referred to (in this case 'LabelLayer') may vary.

Cause

The name exists in more than one namespace and the compiler thinks you are using the version that you do not have access to.

Remedy:

Try fully qualifying the name. For example 'MapInfo.Mapping.LabelLayer'. (Be sure to use the fully qualified name applicable to the object you are using.)


These notes have been tested within Microsoft Visual Studio .NET 2003, and may apply to other versions as well.



About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.