Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reserved words in Enum
Message
De
12/03/2014 09:20:28
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01596180
Message ID:
01596276
Vues:
38
>I did not know that. Personally I would probably change the ReadOnly enum slightly, to Read_Only for instance, in a way that makes the meaning clear without conflicting with a reserved word, but that's useful to know. Thanks.

I am filtering near 30 reserved words for SQL Server SQL commands. So, everytime there is a reserved word that I need to take care of, I wouldn't want to do it in the code but let the framework decide to adjust on its own. As for SQL Server SQL commands, on that one, there is just no possibility of changing a word. So, it would also end up like [Table] if I have a table named Table. I believe it is important that the developer relies on the commonly used word instead of trying to know what is its mirroring representation. In this case, it is an enumeration. Thus, in the application code, we simply use Framework.FileAttribute.ReadOnly, Framework.FileAttribute.System and Framework.FileAttribute.Hidden. I wouldn't really do not want to have in there Framework.FileAttribute.Read_Only.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform