Underscore-named variables and CLS Compliance in VB

When I moved to .NET from VB6, I loved the ability to name variables beginning with an underscore. Now that I am porting some .NET 1.1 code to .NET 2.0, I am seeing that this in non-CLS compliant.

However, because the handful of variables that use the underscore are in a class that has many subclasses and some of these variables are used in the subclasses (shared, protected) AND because this class is not something that anyone else will ever use outside of my application, I have made an executive decision NOT to fix the variables but to set the CLSCompliant attribute from the Assembly information to False.



Don’t Forget: www.acehaid.org

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.