Does VB.NET have any scope nesting operators like {} in C type languages?
Example C++ type code:
int i; i = 0; { int i; i++; }
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, VB.Net has no such blanket scoping modifiers. You can simulate them by using an empty loop like the following.
However it will still not permit you to redefine a variable with the same name. In VB.Net (and C#) it is not legal to define a variable in a nested scope with the same name as a variable in an outer scope.