GMCS
Greetings,
My next attempt is to compile using GMCS. Here is the command...
$ gmcs -define:MONO -debug -nologo -out:./test.exe -unsafe -recurse:*.csThis begins to compile, but it will abort with this error message...
./Utility.cs(388,34): warning CS0168: The variable `e' is declared but never usedHere is the section of code...
./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
public static ListAny Suggestions?CastConvertList (List list) where TOutput : TInput
{
return list.ConvertAll(new Converter (delegate(TInput value) { return (TOutput)value; }));
}
public static ListSafeConvertList (List list) where TOutput : class
{
Listoutput = 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;
}
-Ravon

0 Comments:
Post a Comment
<< Home