将Visual Studio切换到C#?
正在尝试使用控件运行我的第一个windows窗体。我一直没能弄明白什么。然后我意识到,这都是在VB中实现的。如何将生成的文件切换到C#?我糊涂了吗?这是我尝试为Button_Start添加第一个控件时得到的结果:将Visual Studio切换到C#?,c#,vb.net,visual-studio-2008,C#,Vb.net,Visual Studio 2008,正在尝试使用控件运行我的第一个windows窗体。我一直没能弄明白什么。然后我意识到,这都是在VB中实现的。如何将生成的文件切换到C#?我糊涂了吗?这是我尝试为Button_Start添加第一个控件时得到的结果: Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Click_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Start.Click
End Sub
End Class
哇,那太傻了。我不知道有多个版本。谢谢您需要创建一个C#Winforms项目,而不是VB Winforms项目。如果您使用的不是Visual Studio的完整版本,而是Express版本,那么您需要下载C#Express版本,而不是VB Express版本。您的项目似乎当前是一个VB.NET WinForms项目 如果要将VB.NET代码转换为C#,请尝试联机代码转换器。外面有很多,但也许可以试试 只需在解决方案中添加一个新的C#WinForms项目,并根据需要进行复制/粘贴