Somebody to convert code from C# to VB
Hello, someboy who helpe to convert this code.
Really i don´t know about VB.
Thanks a lot in advanced.
Fausto
Imports System
Imports System.Net
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Documents
Imports System.Windows.Ink
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Animation
Imports System.Windows.Shapes
Imports System.Collections.Generic
Public Class ValidationScope
'' Using a DependencyProperty as the backing store for Errors. This enables animation, styling, binding, etc...
Public Shared ReadOnly ErrorsProperty As DependencyProperty = DependencyProperty.RegisterAttached("Errors", GetType(IList(Of ValidationError)), GetType(ValidationScope), New PropertyMetadata(Nothing, ErrorsChanged))
Public Shared Function GetErrors(ByVal obj As DependencyObject) As IList(Of ValidationError)
Return CType(obj.GetValue(ErrorsProperty), IList(Of ValidationError))
End Function
Public Shared Sub SetErrors(ByVal obj As DependencyObject, ByVal value As IList(Of ValidationError))
obj.SetValue(ErrorsProperty, value)
End Sub
Public Shared Sub ErrorsChanged(ByVal obj As DependencyObject, ByVal args As DependencyPropertyChangedEventArgs)
Dim element As FrameworkElement = DirectCast(obj, FrameworkElement)
element.BindingValidationError += Function(sender As Object, e As ValidationErrorEventArgs) Do
If e.Action = ValidationErrorEventAction.Added Then
GetErrors(obj).Add(e.[Error])
Else
GetErrors(obj).Remove(e.[Error])
End If
End Sub
End Class
Purushottam RathorePosted Nov 13, 2009, 7:10 AM
Please downlode C# to vb converter and try to convert your code. this link will helpful for you
http://www.tangiblesoftwaresolutions.com/Demo.htm
Lalit MPosted Nov 16, 2009, 12:50 AM
keshav singhPosted Nov 16, 2009, 12:21 AM
http://www.developerfusion.com/tools/convert/csharp-to-vb/
this may helps you
fausto usmePosted Nov 13, 2009, 8:26 AM
fausto usmePosted Nov 12, 2009, 9:52 PM
I was a mistake, because i wanted convert from c# to Vb.
I did it, but the problem is that it doesn´t compile in VB.
Please, review it.
Thanks a lot,
fausto.
Mahesh ChandPosted Nov 12, 2009, 8:38 PM
http://www.kamalpatel.net/ConvertCSharp2VB.aspx
Kirtan PatelPosted Nov 12, 2009, 6:08 PM
Here is Converted Code
please dont forget to mark "Do you like this answer check box" if my answer helps you :)