[Mono-list] Trying to port code from my MSDN Article and having trouble.

Peter Kellner peter at peterkellner.net
Fri Jul 27 16:50:29 EDT 2007


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




More information about the Mono-list mailing list