Anders Hejlsberg's C# 4.0 REPL

前端 未结 10 676
甜味超标
甜味超标 2020-12-13 04:05

During the last 10 minutes of Ander\'s talk The Future of C# he demonstrates a really cool C# Read-Eval-Print loop which would be a tremendous help in learning the language.

相关标签:
10条回答
  • 2020-12-13 04:46

    I found http://kamimucode.com/Home.aspx/C-sharp-REPL/1 . Which seems to be pretty good and I believe also exposes an API to evaluate expressions dynamically

    0 讨论(0)
  • 2020-12-13 04:47

    The Immediate window (Debug>Windows>Immediate Ctrl+D, I ) is fairly good replacement that's built in. It does require you start the IDE and put a breakpoint on something.

    It does give you the context of where you would like to do experimentation.

    0 讨论(0)
  • 2020-12-13 04:49

    Command-line REPL

    To play with the C# REPL outside of Visual Studio, open the Developer Command Prompt for VS2015 and type the command csi to begin your interactive session. Here is a list of arguments that can be passed to csi.

    Note: csi stands for "CSharp Interactive"

    You can also open an interactive window directly from Visual Studio by navigating to View > Other Windows > C# Interactive.

    Check out the Roslyn Wiki on the C# Interactive Window.

    0 讨论(0)
  • 2020-12-13 04:49

    To update on this old question c# REPL is now available as part of Visual studio IDE (starting VS 2015 update 1).

    Introducing the Visual Studio 'C# REPL'

    0 讨论(0)
提交回复
热议问题