[Mono-list] Compile errors with mono

Chapáev Bracho Toralba chabracho@bsantander.com.mx
Wed, 11 Jun 2003 17:44:35 -0500


Hi

Sorry for my bad english

These code compiled with csc (microsoft) but didn't with mcs. There are
two files, first compiled good but the others didn't. I think mcs must
compile it without problem

// Externa.cs
public class Externa
{
   int dato = 5;
   protected class Protegida
  {
    public void metodo ()
    {
      Externa e = new Externa ();
      System.Console.WriteLine ("Método");
      System.Console.WriteLine ("Dato = {0}", e.dato);
    }
  }
}

mcs /t:library Externa.cs     No problem

//Subclase.cs
class Subclase: Externa
{
  public static void Main ()
  {
    Protegida p = new Protegida ();
    p.metodo ();
  }
}

mcs /r:Externa.dll Subclase.cs
Subclase.cs(10) error CS0122: `Externa+Protegida' is inaccessible
because of its protection level
Compilation failed: 1 error(s), 0 warnings

I have:
Windows NT and mono-0.24-win32-1.exe

Thank's a lot
Chapáev Bracho