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:

 



MarkiMarta.com. Notes of web-specialist
Since 2009
18+
Add hyperlink to GridView programmatically

GridView is a powerful and easy in use tool in Asp.net, especially if you know how to use it. There...

Close