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

  • Thread starter Thread starter Learner
  • Start date Start date
L

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
 
Learner said:
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
 
Back
Top