Paste CSharp as Oxygene
From The Oxygene Language Wiki
This is an IDE topic
Feel free to add your notes to this topic below.
(TODO: merge into Oxidizer)
Portions of existing C# code can easily be converted into the equivalent Delphi Prism code by using the Paste C# as Oxygene menu item available in the context menu of the code editor.
This command will take C# code from the clipboard, convert it to the equivalent Delphi Prism code and paste the conversion result starting at the current caret position.
For example, the following code snippet
Thread lTestThread = new Thread(delegate() { Int32 i = 0; while (i < 4) { Console.WriteLine("Thread Step " + i.ToString()); i++; } }); lTestThread.Start(); Console.ReadLine();
will be converted into
var lTestThread: Thread := new Thread(method begin var i: Int32 := 0; while i < 4 do begin Console.WriteLine('Thread Step ' + i.ToString()); {POST}inc(i) end end); lTestThread.Start(); Console.ReadLine()
See Also
Area: Oxygene IDE
IDE Glossary — Keywords — Types — FAQ — How To