[Mono-list] C typedef to C#

adam treat manyoso@yahoo.com
Mon, 9 Sep 2002 12:54:42 -0700 (PDT)


--- Everaldo Canuto <everaldo.canuto@bol.com.br> wrote:
> I 'm working on convert X11 header files to Mono, but I have one 
> problem, how to convert C typedef instruction into C#.
> 
> Example:
> typedef unsigned long XID;
> typedef XID Window;
> 
> I  using "public struct XID uint {}", but generate a compiler error.

That's not going to work.  This is the correct syntax: "public struct XID : System.UInt64 {}", but
that won't work either.  Structs can not inherit.  Actually, they inherit from System.Object, but
they _cannot_ inherit from any other type.

> Sorry by my english, I'm from Brazil
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com