Fixing error "'Namespace.className.source' is inaccessible due to its protection level" in C#




The reason of error  "'Namespace.className.source' is inaccessible due to its protection level" is that by default class variables "source" and "substitute" are protected and you don’t have access to them anywhere out of the class.

Here’s an example of code with this error:

 

To fix the error "'Anon.logFormat.source' is inaccessible due to its protection level"  you should make variables public:

 




No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment





MarkiMarta.com. Notes of web-specialist
Since 2009
18+