Help me learn C# !

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Im newbie 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. <span class="x_short_text" id="x_result_box" lang="en
<span class="x_hps a few errors <span class="x_hps have occurred (example : about EOF . . . etc). Anyone help me convert it!

<pre class="prettyprint lang-vb 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 Messi - Visual Lightswith "How do i video?"[/code]
<br/>

<br/>

View the full article
 
Back
Top