How do I get around Inconsistant accessibilty error in C # ?

Posted by xarzu on Stack Overflow See other posts from Stack Overflow or by xarzu
Published on 2010-04-28T23:33:12Z Indexed on 2010/04/28 23:37 UTC
Read the original article Hit count: 362

Filed under:
|
|

How do I get around Inconsistant accessibilty error in C # ?

I need to pass a pointer to a node in a linked list to a method. When I do, I get a "Compiler Error CS0051"

Example The following sample generates CS0051:

Copy Code // CS0051.cs public class A { // Try making B public since F is public // B is implicitly private here class B { }

public static void F(B b)  // CS0051
{
}

public static void Main()
{
}

}

That is a simple example. The actual program is a bit more complicated. I am actually using a node in a linked list to pass to the method LinkedListNode node

The method uses recursion because the node is mart of a huge linked list structure of linked lists that outputs an xml file. Either I have to find a way to use recursion without using methods or I need to find a way to pass pointers nodes or actual nodes.

© Stack Overflow or respective owner

Related posts about c#

Related posts about accessibility