Home All Groups Group Topic Archive Search About

Need help in converting from C# to vb.net.

Author
28 Apr 2006 3:25 PM
Learner
Hello Friends,
I need help converting the below C# code snippet to vb.net.

case "CreationDate":
                comparison = new Comparison<MembershipUserWrapper>(
                             delegate(MembershipUserWrapper lhs,
MembershipUserWrapper rhs)
                             {
                                 return
lhs.CreationDate.CompareTo(rhs.CreationDate);
                             }
                             );


to its equivalent vb.net and the tools give me the

Case "CreationDate"
       comparison = New Comparison(delegate, MembershipUserWrapper,
lhs, MembershipUserWrapper, rhs)
       Return lhs.CreationDate.CompareTo(rhs.CreationDate)


But when I pasted the code in my VS.NET it complains about the word
"delegate" in the line


"comparison = New Comparison(delegate, MembershipUserWrapper, lhs,
MembershipUserWrapper, rhs)"


and when I mouse hover it says "Expression expected"


Am I missing some thing here?
Thanks
-L

Author
28 Apr 2006 3:43 PM
Larry Lard
Learner wrote:
> Hello Friends,
>  I need help converting the below C# code snippet to vb.net.

Hi,

Please see my reply in your other thread.

Also, when posting to more than one group, please *cross post* rather
than (as you have here) multiposting (which is posting the same message
separately to many groups). To cross post, just list all the groups you
want to post to in the Groups: line or (since you are using google
groups) in the To: line, like so:

microsoft.public.dotnet.languages.vb,microsoft.public.dotnet.languages.csharp

This means both groups' participants see all the replies.

Thanks

--
Larry Lard
Replies to group please