List Info

Thread: Generics issue




Generics issue
user name
2006-07-17 20:31:00
I've got a generic class:

public class MyClass<T>{
  public void DoSomething( T t ){
  }
}

When I compile this in MD, I get 

[Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
supported.(Exception: System.NotSupportedException)
[Task:File=, Line=0, Column=0, Type=Error,
Description=[Internal(1,1):,Internal(1,1):](being compiled)
[Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
supported.(Exception: System.NotSupportedException)
[Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
supported.(.NotSupportedException)
[Task:File=, Line=0, Column=0, Type=Error,
Description=/home/carlos/Documents/Programming/mono/myproj/M
yClass.cs(1,15):(that
caused the problem begin at)

I selected Mono 2.0 as the runtime in the project options. 
If I change
the type for 't' to object, it compiles fine.  What am I
missing?

_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )