473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

'XXX' is not accessible due to its access level

I'm porting a Java app and re-structuring it slightly to put the test cases
into a separate assembly from the actual code. The conversion wizard creates
a file with a class called SupportClass which has public visibility and also
some public inner classes.

If I move this class into another project (as it's needed by both code and
test) I get an error saying SupportClass can't be used due to it's
visibility. Is it the class that inner classes only have internal visibility
even if they have been marked public or is something else going on?

Regards

Paul
Nov 16 '05 #1
2 2465
Paul,

Can you post the code that you are referring to? If the class and inner
class are both public, there should be no problem.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Paul Hatcher" <ph******@spamless.cix.co.uk> wrote in message
news:u5**************@TK2MSFTNGP12.phx.gbl...
I'm porting a Java app and re-structuring it slightly to put the test
cases
into a separate assembly from the actual code. The conversion wizard
creates
a file with a class called SupportClass which has public visibility and
also
some public inner classes.

If I move this class into another project (as it's needed by both code and
test) I get an error saying SupportClass can't be used due to it's
visibility. Is it the class that inner classes only have internal
visibility
even if they have been marked public or is something else going on?

Regards

Paul

Nov 16 '05 #2
Sorry I was slightly wrong - the message is

'XXX' is not accessible due to its protection level

Paul

"Paul Hatcher" <ph******@spamless.cix.co.uk> wrote in message
news:u5**************@TK2MSFTNGP12.phx.gbl...
I'm porting a Java app and re-structuring it slightly to put the test cases into a separate assembly from the actual code. The conversion wizard creates a file with a class called SupportClass which has public visibility and also some public inner classes.

If I move this class into another project (as it's needed by both code and
test) I get an error saying SupportClass can't be used due to it's
visibility. Is it the class that inner classes only have internal visibility even if they have been marked public or is something else going on?

Regards

Paul

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: Tools | last post by:
What's the best browser to test for website accessibility? Is there a free screen reader I can use to test how my site reads best?
1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
3
by: R2 | last post by:
Hello Can anyone advise / help on this problem. I have a friend (brother in law) who is in the (spam) telephone fax business. He would like to convert numerous phone lists from old data bases to...
4
by: Adriano Coser | last post by:
I'm getting the following error: error C3767: PictureSource - candidate function(s) not accessible when accessing a public member function of a managed class, either from managed or unmanaged...
1
by: Dave | last post by:
I am getting te following error in a ASP.Net app that is running on Win XP Pro (SP2): Server cannot access application directory 'C:\Documents and Settings\dave\My Documents\My Visual Studio...
2
by: Matthias Wohlmann | last post by:
Hi, I'm getting the following error when trying to start my application using Internet Explorer: "Server cannot access application directory D:\xxx. The directory does not exist or is not...
0
by: Pablo | last post by:
Hi, I am create my own control and I have the next error: Error Creating Control: 'xxx1' could no be set on property 'XXX' Class Code (Header):
0
by: vve | last post by:
I'm discovering a strange behaviour in an C# project using ZedGraph (https://sourceforge.net/projects/zedgraph/). After adding a signal to it, it seems that the clr goes mad for some reason. I...
4
by: jiatiejun | last post by:
I want to convert a path from ~/xxx/xxx.gif to 'http://xxxxxxx/xxx/xxx.gif' how to convert it? thanks btw: the convert function allow
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.