c# - 运行 .cs 文件 - visual studio 2012

标签 c#

嗨,我刚刚开始使用 visual studio 2012 和 windows 8 学习 c#,教程提供了一些 .cs 文件,但没有解释如何运行它们。这是本教程中的所有命令行内容。 This stack overflow answer 给出了最简单的方法(在回答其他人的类似问题时)。

If you already installed Visual Studio, just: Click Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt and there you have your command line box where you compile as follows:

csc PathToYourCsSource

我找不到 visual studio 工具。我在 Windows 8 的搜索中输入了它。谢谢

最佳答案

更容易:运行 Visual Studio -> 创建一个新的 C# 控制台项目。

这将创建一个包含简单 Program.cs 文件的项目。您只需复制/粘贴其中,然后单击 F5 运行该项目。

关于c# - 运行 .cs 文件 - visual studio 2012,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18038389/

相关文章:

c# - 如何衡量冷代码性能?

c# - 'RestSharp.IRestResponse`1<T0>' 在未引用的程序集中定义

c# - 如何在 C# 中以线程安全的方式读取/生成+读取文件

c# - 如何重构对服务层的 RIA 数据服务调用?

c# - 等效接口(interface)之间的隐式转换

c# - 根据 c# 中的两个出生日期,占星术明星之间的兼容性

c# - 请求被中止 : Could not create SSL/TLS secure channel when using X509Certificate2

c# - 无需安装 Visual Studio 即可注入(inject) DLL?

c# - 在循环中使用 NEW 时,将项目添加到对象的 LIST<> 会导致重复的对象

c# - 在C#的 “getTickFrequency”中相当于来自OpenCV的 “Emgu”?