Is there ever a reason to use goto in modern .NET code?

前端 未结 19 1675
野性不改
野性不改 2020-12-08 14:19

I just found this code in reflector in the .NET base libraries...

    if (this._PasswordStrengthRegularExpression != null)
    {
        this._PasswordStreng         


        
19条回答
  •  春和景丽
    2020-12-08 14:59

    I have seen goto used to break out of nested loops:

    How can I break out of two nested for loops in Objective-C?

    I don't see anything wrong with using it that way.

提交回复
热议问题