Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Reserved word
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Reserved words and language independence== Microsoft's [[.NET Framework|.NET]] [[Common Language Infrastructure]] (CLI) specification allows code written in 40+ different programming languages to be combined into a final product. Because of this, identifier/reserved word collisions can occur when code implemented in one language tries to execute code written in another language. For example, a [[Visual Basic (.NET)]] library may contain a [[Class (computer programming)|class]] definition such as: <syntaxhighlight lang="vbnet"> ' Class Definition of This in Visual Basic.NET: Public Class this ' This class does something... End Class </syntaxhighlight> If this is compiled and distributed as part of a toolbox, a [[C Sharp (programming language)|C#]] programmer, wishing to define a variable of type "<code>this</code>" would encounter a problem: <code>'this'</code> is a reserved word in C#. Thus, the following will not compile in C#: <syntaxhighlight lang="csharp"> // Using This Class in C#: this x = new this(); // Won't compile! </syntaxhighlight> A similar issue arises when accessing members, overriding [[virtual method]]s, and identifying namespaces. This is resolved by [[Stropping (syntax)|stropping]]. To work around this issue, the specification allows placing (in C#) the [[at-sign]] before the identifier, which forces it to be considered an identifier rather than a reserved word by the compiler: <syntaxhighlight lang="csharp"> // Using This Class in C#: @this x = new @this(); // Will compile! </syntaxhighlight> For consistency, this use is also permitted in non-public settings such as local variables, parameter names, and private members.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Reserved word
(section)
Add topic