Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create custom keywords C# [duplicate]

I'm writing a library for personal use that greatly expands C# features, and I was wondering on something quite interesting... Is it possible to create you own keywords? For example, if, foreach, for etc.

The reason I want to do this can be found at my previous question.

like image 707
TechnicalTophat Avatar asked Jun 08 '16 09:06

TechnicalTophat


People also ask

Can we create our own keywords in C?

No, you cannot create a new keyword in the way you have indicated.

What are custom keywords?

In addition to the built-in keywords, users can define custom keywords to extend the capability of Katalon Studio. Once created, custom keywords can be used in test cases just like other built-in keywords. This feature allows users to expand keywords and reuse them across projects.

What is C++ keyword?

Keywords (also known as reserved words) have special meaning to the C++ compiler and are always written or typed in short(lower) cases. Keywords are words that the language uses for a special purpose, such as void, int, public, etc. It can't be used for a variable name or function name.


1 Answers

No, you can not do that. Language keywords are defined in the language definition. You could probably use the open sourced parts (compilers, etc) and create your own version of them.

like image 186
Thorsten Dittmar Avatar answered Sep 20 '22 16:09

Thorsten Dittmar