Vote UpVote

Delphi, C#, VB.NET and SQL all have escapes to use reserved words as identifiers

The Wiert Corner – Normally you would not want to use a reserved word as an identifier. But sometimes it can be very convenient, for instance for a code generator that wraps remoting calls or does ORM. Both Delphi and C# have an escape for this: & prefix for Delphi. @ prefix for C#. [] embedding for VB.NET. “” embedding in many SQL syntaxes. The prefixes are to tell the compiler knows you really know what you are doing, and are using a reserved word as an identifier. The cool thing: in the Run Time Type Information (Delphi) or Reflection (C# and VB.NET) you will see the names without the ...
Favorite? Off-Topic? jpluimers @ 2014-11-04 06:00


Visits: 682
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)