社区
VC.NET
帖子详情
请问vc.net怎样添加已有的.cs文件
xinustc
2009-03-24 07:37:38
想通过实例学习,可是连运行都不会 汗...
如果直接打开则编译不用,通过新建项目,却不知道怎么添加.cs文件,高手莫笑
...全文
91
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++的源文件。
asp
.net
知识库
怎么在ASP
.NET
2.0中使用Membership asp
.net
2.0-实现数据访问(1) ASP
.NET
2.0 新特性
.NET
2.0里使用强类型数据创建多层应用 在MastPage中引用脚本资源 2.0正式版中callback的一些变化+使用示例(ASP
.NET
2.0)...
VC
++(VS2010)读写Excel
文件
代码(附示例)
2)将Export2Excel.h,Export2Excel.cpp两个
文件
添加
到项目; 3)包含头
文件
,#include "ExcelLib/Export2Excel.h" 通过以上步骤在程序中引入了可以读取Excle
文件
的CExport2Excel类; 5、打开excel
文件
通过...
linecount智能源码统计专家软件下载
1、 支持
VC
++、
VC
.Net
项目
文件
的统计方式。 2、 支持C++ Builder项目
文件
的统计方式。 3、 支持C/C++
文件
.cpp 和 .h 的
文件
统计。 4、 支持同时多个
文件
的统计方式。 5、 支持同时多种
文件
类型的统计方式。 6、 ...
C#微软培训资料
1.1 Microsoft
.NET
——一场新的革命.4 1.2
.NET
与 C#.6 1.3 C#语言的特点.8 1.4 小 结 .11 第二章 运行环境 全面了解
.NET
.12 2.1
.NET
结构.12 2.2 公用语言运行时环境与公用语言规范.13 2.3 开 发 ...
vc
++ 应用源码包_6
内含各种例子(
vc
下各种控件的使用方法、标题栏与菜单栏、工具栏与状态栏、图标与光标、程序窗口、程序控制、进程与线程、字符串、
文件
读写操作、
文件
与
文件
夹属性操作、
文件
与
文件
夹系统操作、系统控制操作、程序...
VC.NET
7,540
社区成员
27,673
社区内容
发帖
与我相关
我的任务
VC.NET
.NET技术 VC.NET
复制链接
扫一扫
分享
社区描述
.NET技术 VC.NET
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章