Hello
I'm trying to run the code I have attached, but I get this
error (using Mono 0.19):
** (test.exe:2333): WARNING **: Could not load class from token 0x01000002 in
test.exe
** (test.exe:2333): WARNING **: Missing method .ctor in assembly test.exe
typeref index 2
** ERROR **: file jit.c: line 1923 (mono_analyze_stack): assertion failed: (cm)
aborting...
It consists of a library which contains a class, Tree, and another file
which implements Main. It gets compiled without any error or warning
but it doesn't run (I don't know if I have made a mistake, because I am
learning C#)
Moreover, if I rename the file library TreeDiskSpace.cs into Tree.cs
and recompile, It runs correctly !!
Is this a bug of the compiler, or am I making a mistake?
Thanks!
--
Sysadmins busy fighting SPAM.
using System;
namespace Utils {
public class Tree
{
string pth;
public string Pth
{
get {
return pth;
}
set {
pth = value;
}
}
public Tree (string pth)
{
this.pth = pth;
}
}
}
using System;
using Utils;
namespace Program {
class test
{
static void Main ()
{
Tree tds = new Tree ("");
tds.Pth = "Mail";
Console.WriteLine(tds.Pth);
}
}
}
msg00018/pgp00000.pgp
Description: PGP signature
