[nem-en] Macros and extension methods
Alejandro Serrano
trupill at yahoo.es
Fri Jun 9 17:16:52 CEST 2006
Hi,
I'm trying to learn a bit about macros. I've coded the following macro:
macro Example (item)
{
<[ ($item).Select (fun (x) { x > 2 }) ]>
}
and then used it in code:
def ls = System.Collections.Generic.List ();
ls.Add (1);
ls.Add (2);
ls.Add (3);
def t = Example (ls);
but the compiler complains: "there is no member named `Select' in
System.Collections.Generic.List[int] with type ?", even though I've
added a reference to System.Query.dll and "using System.Query;" at the
top of the file. It works completely fine without the macro (I mean,
writing "ls.Select ...").
Is the macros engine some how not usable along with extension methods?
Thanks in advance
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
More information about the devel-en
mailing list