[Mono-list] Unable to compile Stack<string> variable on mcs on Ubuntu: Help Please

Xeno Campanoli xeno at eskimo.com
Thu Oct 5 18:39:00 EDT 2006


I get the following diagnostic trying to compile code I cite at the 
bottom of this message:

xeno at radioflyer:~/study/puzz/cs$ mcs -debug try003.cs
try003.cs(22,15): error CS8025: Parsing error
Compilation failed: 1 error(s), 0 warnings
xeno at radioflyer:~/study/puzz/cs$

You can also see I have the Generic using line commented out because it 
yields the following diagnostic when line 22 is commented out:

xeno at radioflyer:~/study/puzz/cs$ mcs -debug try003.cs
try003.cs(5,7): error CS0234: The type or namespace name `Generics' 
does not exist in the namespace `System.Collections'. Are you missing an 
assembly reference?
try003.cs(5,1): error CS0246: The type or namespace name 
`System.Collections.Generics' could not be found. Are you missing a 
using directive or an assembly reference?
Compilation failed: 2 error(s), 0 warnings
xeno at radioflyer:~/study/puzz/cs$

Here is the source file:
-----------------------------------------------------------------------
// BTreeTry

using System;
using System.Collections;
//using System.Collections.Generics;
using System.Text;

namespace BTreeTrySpace {

public class BTreeNode
{
public BTreeNode Left;
public BTreeNode Right;
public string VALUE;
}

public class BTreeUtil
{
// Everything else is at the class level, so same here to be consistent.
public const int MAXDEPTH = 32;
//public Stack<string> sFlagStack;
public stack<Int32> intStack = new Stack<Int32>(); // line 22
// public static BTreeNode sNodeStack[];
// public static int sNodeDepth;

}

class BTreeTry {
static void Main()
{
// Use the system console object
System.Console.WriteLine("Hello, Java!");
}
}
}
// end of BTreeTry
-----------------------------------------------------------------------------------------------------

-- 
Support Instant Runoff Voting!  YES ON 3:
	1.  Cut off Mudslinging Politics!
	2.	Bring back real Democracy!



More information about the Mono-list mailing list