社区
VC.NET
帖子详情
请问vc.net怎样添加已有的.cs文件
xinustc
2009-03-24 07:37:38
想通过实例学习,可是连运行都不会 汗...
如果直接打开则编译不用,通过新建项目,却不知道怎么添加.cs文件,高手莫笑
...全文
127
7
打赏
收藏
请问vc.net怎样添加已有的.cs文件
想通过实例学习,可是连运行都不会 汗... 如果直接打开则编译不用,通过新建项目,却不知道怎么添加.cs文件,高手莫笑
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Grave_rain
2009-03-24
打赏
举报
回复
没懂,看看!!
vrhero
2009-03-24
打赏
举报
回复
VC是不可能编译C#代码的...虽然.NET支持多语言但是不支持混合语言,这点你要搞清楚...
xinustc
2009-03-24
打赏
举报
回复
现在加进去了 但是无法编译通过 是版本的问题 已有的程序是vc2002编译的 我想把它在vc2008下编译
不知道怎么弄- -
程序很简单 就一个cs文件:
form.cs
**********************************************************
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace myFirstWinApp
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox txt_input;
private System.Windows.Forms.Button btn_ok;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.txt_input = new System.Windows.Forms.TextBox();
this.btn_ok = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// txt_input
//
this.txt_input.Location = new System.Drawing.Point(88, 64);
this.txt_input.Name = "txt_input";
this.txt_input.TabIndex = 0;
this.txt_input.Text = "朋友,你好!";
//
// btn_ok
//
this.btn_ok.Location = new System.Drawing.Point(104, 128);
this.btn_ok.Name = "btn_ok";
this.btn_ok.TabIndex = 1;
this.btn_ok.Text = "我想说";
this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.btn_ok,
this.txt_input});
this.Name = "Form1";
this.Text = "我的第一个Windows应用程序";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void btn_ok_Click(object sender, System.EventArgs e)
{
MessageBox.Show(txt_input.Text, "Hello");
}
}
}
chensan
2009-03-24
打赏
举报
回复
你可能没有安装完整,只安装vc的工程。
Dobzhansky
2009-03-24
打赏
举报
回复
要编译 c sharp, 建立 c# 的工程啊, visual studio 不是只支持 vc 一种工程类型的
xinustc
2009-03-24
打赏
举报
回复
我就是要编译c sharp啊
宝_爸
2009-03-24
打赏
举报
回复
cs是C#的源文件,不是VC++的源文件。
头疼的
VC
.NET
的效率问题
本文探讨了使用
VC
6与VS2008读取S-57标准海图数据的效率差异,并通过代码优化实现了显著提速。在实际应用中,针对不同环境下的性能表现进行了对比。
C#常见错误_
CS
0006未能找到元数据
文件
文章介绍了在C#与HALCON视觉交互时遇到的
CS
0006编译错误,该错误通常是由于编译器无法找到元数据
文件
导致。解决方法包括检查程序集路径、清除编译缓存和修改项目
文件
中的程序集路径。提供了详细的步骤和建议来帮助开发者解决此类问题。
如何把.
cs
文件
编译成DLL
文件
本文介绍如何使用Microsoft Visual Studio
.NET
2013的命令行工具
cs
c将.
cs
源
文件
编译成DLL
文件
,包括如何引用外部DLL
文件
的具体步骤。
.aspx
文件
与.aspx.
cs
文件
的关系(转载)
本文解释了ASP
.NET
中aspx和aspx.
cs
文件
的作用及其相互关系。aspx负责页面显示,aspx.
cs
则包含服务器端逻辑。通过Code-Behind结构实现前后端分离,有利于代码管理和维护。
快速掌握
VC
6.0中各种宏注释(附图)
本文详细介绍了在
VC
6.0中如何使用宏定义方式
添加
文件
头注释和函数方法注释,包括设置快捷键、编写脚本等内容,帮助开发者快速熟悉并掌握这一技能。
VC.NET
7,539
社区成员
27,670
社区内容
发帖
与我相关
我的任务
VC.NET
.NET技术 VC.NET
复制链接
扫一扫
分享
社区描述
.NET技术 VC.NET
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章