StringUtil is the (static) class in your project. This class is most likely defined as:
private static void StringUtil
This means that your WebAdminPage cannot see it, because it is private . This will result in an error. Change it to:
public static void StringUtil
Now any class can use it at any time.
Learn more about security levels in Microsoft Documentation :
EDIT
After reviewing the error code again, I see that the namespace for StringUtil is System.Configuration.StringUtil , which means that it is a system class, not a class in your project. According to Microsoft source code, this class is defined as a static internal class StringUtil . Following the previous link on protection levels, we can see that:
Internal: access is limited to the current assembly
This means that the StringUtil class can only be used from the assembly (DLL file) in which it is limited. If you cannot add your own code to the Microsoft system DLL files, you cannot use this method (since Microsoft added it for your own internal use).
Gthvidsten
source share