Delphi C# の予約語対応表です。
※文法の違いがあるため1対1の対応になるとは限りません。
| Delphi | C# |
|---|---|
| library | class |
| package | class |
| unit | class |
| program | class |
| uses | using |
| interface | interface |
| dispinterface | interface |
| initialization | public void initialization() |
| finalization | public void finalization() |
| const | const |
| resourcestring res = string | const string res = string |
| type | |
| array of | [] |
| record ... end | struct |
| set ... of | enums |
| File ... of | System.IO.File |
| procedure | (C#void戻り型関数定義) |
| function | (C#関数定義) |
| constructor | (C#コンストラクタ定義) |
| destructor | (C#デストラクタ定義) |
| object ... end | class |
| public | public |
| protected | protected |
| private | provate |
| published | (public) |
| class of ... | object |
| class ... end | class |
| overload | overload |
| virtual | virtual |
| virtual;abstract; | abstract |
| dynamic | |
| message | |
| export | |
| deprecated | |
| property | |
| := | = |
| while do | while |
| for | for |
| repeat..until | do..while |
| if ... then ... else ... | if ... else ... |
| case ... of ... | switch ... |
| with | using |
| try ... except ... finally | try ... catch... finally |
| Raise | throw |
| asm ... end | |
| requires | |
| contains | |
| exports | |
| resident | |
| inline | |
| inherited | |
| case ... of | |
| function IDENTIFIER = IDENTIFIER; | |
| procedure IDENTIFIER = IDENTIFIER; | |
| コンパイラ指令($IFDEF $ELSE $ENDIF) | #if #else #endif |
http://www.netcoole.com/delphi2cs/statements.htm