How to convert this C # code to Visual Basic

I'm not sure how to convert C # code with delegate to Visual Basic code, can you help me?

List<XmlUser> matchingUsers = this.Store.Users.FindAll(delegate(XmlUser user) 
    {
        return user.Email.Equals(emailToMatch,
            StringComparison.OrdinalIgnoreCase);
    }
);
+3
source share
3 answers
Dim matchingUsers As List(Of XmlUser) = Me.Store.Users.FindAll( _
    Function(user As XmlUser) user.Email.Equals(emailToMatch, StringComparison.OrdinalIgnoreCase) _
)
+6
source

Compile the code. Get .Net Reflector:

http://www.red-gate.com/products/reflector/

and select Visual Basic to disassemble. This is an easy way to convert between two languages.

+3
source

. .

, Google .

+1

Source: https://habr.com/ru/post/1760534/


All Articles