Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VB .Net equivalent for yield break;

Tags:

c#

.net

vb.net

Does VB.Net have an equivealent for c#'s yield break?

Public Function Validate(validationContext As ValidationContext) 
                As IEnumerable(Of ValidationResult) 
                Implements IValidatableObject.Validate
    '' what is equivalent to C#'s - yield break;
End Function
like image 854
Chris_web Avatar asked Jun 27 '13 13:06

Chris_web


1 Answers

Yield exists in vb.net, as you can see in msdn

And you'll even find information on yield break :

You can use an Exit Function or Return statement (Visual Basic) or yield break statement (C#) to end the iteration.

like image 173
Raphaël Althaus Avatar answered Nov 07 '22 10:11

Raphaël Althaus