Help me convert this code from Vb.Net to C#, plz? I'm newbie.

  • Thread starter Thread starter Boyzjno
  • Start date Start date
B

Boyzjno

Guest
Im learning in c#.

I have a code from Vb.Net. And Im trying convert it to C#. I used google and found some website for do that (example : http://www.developerfusion.com/tools/convert/vb-to-csharp/ , http://converter.telerik.com/ ), But they can not convert it. a few errorshave occurred (example : about EOF . . . etc). Anyone help me convert it!


Private Sub Product_Validate(results As EntityValidationResultsBuilder)

If Me.Product IsNot Nothing Then
Dim dupes = From detail In Me.OrDerHeader.OrderDetails
Where detail.Product IsNot Nothing AndAlso
detail.Product.Id = Me.Product.Id AndAlso
detail IsNot Me

If dupes.Any Then
results.AddPropertyError (Me.Product.ProductName +
" is a duplicate product.")
EndIf

End If
End Sub

this code from Beth Massi - Visual Lightswith "How do i video?"

Continue reading...
 
Back
Top