英文:
Is there a way to call application classes/functions from c# interactive?
问题
自从几周前我开始开发一个C#应用程序。我上次使用C#是8年前,所以我需要重新学习C#和VS。
我正在寻找一种从终端/命令行调用/与我的应用程序交互的方法。我找到了C#交互式,基本上是我正在寻找的,但我不能与我的应用程序进行交互。
我不能访问环境变量或从我的项目中调用类。有没有办法可以实现这一点?这将使我更容易测试一些函数或逻辑。对于熟悉Laravel(PHP)的人来说,我正在寻找类似于"thinker"的东西。
提前感谢!
英文:
Since a few weeks i started to develop a c# application. The last time i did something with c# is 8 years ago so i need to re-discover c# and VS.
I'm looking for a way to call/interact with my application from a terminal/command line. I found c# interactive which is basically where i'm looking for except that i cannot interact with my application.
I cannot reach environment variables or call classes from my project. Is there a way how i can achieve this? It would make it easier to test some functions or logic for me. For the people who are familiar with Laravel (PHP), i'm looking for something similar to thinker.
Thanks in advance!
答案1
得分: 1
我刚刚找到了如何实现这一点。
您可以在解决方案资源管理器中右键单击项目,然后单击“使用项目初始化交互”。
之后,我可以简单地访问项目的命名空间(们)。
英文:
I just found how to achieve this.
You can do a richt click on the project in the solution explorer and than click `Initialize interactive with project".
After this i can simply access the project namespace(s).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论