Is it possible to use "static" in an enumeration as such:
private enum pdfMode { generate, static }
Obviously, “static” is a keyword.
It would be nice, since I have pdfMode, which is really referred to as "static" in the application.
One possibility is to use Generate and Static inside an enumeration. In any case, IMO in uppercase looks best.
Generate
Static
To use the keyword as an identifier, use the @ symbol:
@static
But the use of Pascal is advisable here.
private enum PdfMode { Generate, Static }
See Enumeration Type Naming Principles :
Use the Pascal argument for names and name names.
You can escape the keyword using @ , for example:
@
private enum pdfMode { generate, @static }
private enum PdfMode { PdfMode_Generate, PdfMode_Static }
since it does not conflict with
private enum xxxType { xxxType_Moving, xxxType_Static }
Source: https://habr.com/ru/post/1335107/More articles:Powershell dictionary array assignment - powershellMake OR query more streamlined - sqlJSF: how to update required field in ajax request - ajaxDisplay query results horizontally - sqlCan ThreadStatic IDisposable be automatically deleted? - c #How do you get HPC to admit that you have 100% coverage of the guards in Haskell? - haskellCan I create an XmlNamespaceManager object from an XML file that I am going to read? - c #How to use rowlock and readpast with NHibernate? - nhibernateDate value 02/31/2157? - dateRecommendations for a good PHP PHP class - httpAll Articles