I’ve encountered a problem with dynamic filed opearations…I have a method:
public Watcher GoToEnd(Watcher begin)
{
Watcher searcher = begin;
while(searcher.Next =! null)
{
searcher = searcher.Next;
}
return (searcher);
}
but I’m getting a error “Inconsistent accessibility: return type ‘Back_Maker_3.Watcher’ is less accessible than method ‘Back_Maker_3.BMmain.GoToEnd(Back_Maker_3.Watcher)'”
Can someone see wham am I missing? I realy have no idea what’s wrong…
The problem is that your
Watcherclass isn’tpubliclike your method, which exposesWatcheras both its return type and one of its arguments, which is not allowed.You can either make the
Watcherclasspublic, or you can giveGoToEndthe same accessibility asWatcher. I think you probably intended to makeWatcherpublic, though.