[Mono-list] Trying to port code from my MSDN Article and having trouble.
Jonathan Chambers
joncham at gmail.com
Fri Jul 27 16:55:46 EDT 2007
Hi Peter,
I'm guessing you tried to compile with mcs. You need to compile with
gmcs, rather than mcs, to use 2.0 features (like generics).
Thanks,
Jonathan
On 7/27/07, Peter Kellner <peter at peterkellner.net> wrote:
>
> So, a while back I wrote an MSDN article on managing asp.net 2.0
> membership with business objects. I'm trying to port that code and
> don't quite have it all working. My first issue was I got a Data
> Conversion error which I don't get with Microsoft's .net. I had brought
> in the dll's directly and it was not giving me a line number. So, I
> decided to try and compile my 3 source objects.
>
> I have a declaration like this that is giving me an error with mono:
> (using the vmware distribution).
>
>
> namespace MembershipUtilities
> {
>
> [DataObject(true)] // This attribute allows the
> public class RoleDataObject
> {
>
> [DataObjectMethod(DataObjectMethodType.Select, true)]
> static public List<RoleData> GetRoles()
> // ERROR FROM MONO COMPILER POINTS TO THIS LINE
> {
> return GetRoles(null, false);
> }
> ...
>
> The error I get from mono develop is: CS1518: Expected
> class,delegate,enum,interface, or struct'
>
> Can someone point out what's not good about my syntax? It's pointing at
> the static line. Also, when I get a runtime error, will I get the line
> of code from my asp.net app if I have debug=true set in my web.config
> and I compile the library that includes the above code with debug?
>
> Thanks,
>
> BTW, my article on converting is here:
> http://msdn2.microsoft.com/en-us/library/aa478947.aspx
>
> Peter Kellner
> http://peterkellner.net
> MVP, ASP.NET
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070727/c9e29792/attachment.html
More information about the Mono-list
mailing list