kubuntUO - RunUO linux for human beings

Tuesday, January 16, 2007

GMCS

Greetings,

My next attempt is to compile using GMCS. Here is the command...

$ gmcs -define:MONO -debug -nologo -out:./test.exe -unsafe -recurse:*.cs
This begins to compile, but it will abort with this error message...
./Utility.cs(388,34): warning CS0168: The variable `e' is declared but never used
./Utility.cs(1098,109): error CS0030: Cannot convert type `TInput' to `TOutput'
./Utility.cs(1098,109): The type has two conflicting definitions, one comes from test, Version=0.0.0.0, Culture=neutral and the other from test, Version=0.0.0.0, Culture=neutralerror)
Compilation failed: 1 error(s), 5 warnings
Here is the section of code...

public static List CastConvertList(List list) where TOutput : TInput
{
return list.ConvertAll(new Converter(delegate(TInput value) { return (TOutput)value; }));
}

public static List SafeConvertList(List list) where TOutput : class
{
List output = new List(list.Capacity);

for (int i = 0; i < list.Count; i++)
{
TOutput t = list[i] as TOutput;

if (t != null)
output.Add(t);
}

return output;
}

Any Suggestions?

-Ravon



0 Comments:

Post a Comment

<< Home