Method Inaccessible due to its protection level
Posted on 2007-10-09
I'm working in C#/ASP.net and have a BizObject class with the following method:
protected static string ConvertNullToEmptyString(string input)
return (input == null ? "" : input);
I am trying to call the method as stringhere = BizObject.ConvertNullToEmptyString(stringhere) and am getting the error edu.xxx.yyy.BLL.BizObject.ConvertNullToEmptyString(String) is inaccessible due to its protection level, where edu.xxx.yyy.BLL is the actual namespace of the class making the method call as well as, obviously, the namespace of the BizObject class. I am making the same call from another class in the namespace and that call is working just fine, but it is not working in this instance.
Any help would be appreciated