社区
VC.NET
帖子详情
请问vc.net怎样添加已有的.cs文件
xinustc
2009-03-24 07:37:38
想通过实例学习,可是连运行都不会 汗...
如果直接打开则编译不用,通过新建项目,却不知道怎么添加.cs文件,高手莫笑
...全文
98
7
打赏
收藏
请问vc.net怎样添加已有的.cs文件
想通过实例学习,可是连运行都不会 汗... 如果直接打开则编译不用,通过新建项目,却不知道怎么添加.cs文件,高手莫笑
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用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++的源文件。
★VisualStudio 2015 如何将aspx.
cs
代码编译为dll.docx
- 如果项目中有多个 aspx.
cs
文件
,它们会被合并到同一个 dll
文件
中,除非你在“编译”选项卡下为每个 aspx.
cs
文件
设置了不同的类名空间。 - 在服务器上部署时,务必检查应用程序池的
.NET
Framework 版本与项目的...
VC
.net
异步装载大图像
文件
实例代码.rar
在
VC
.NET
编程环境中,处理大图像
文件
时可能会遇到性能问题,因为这通常涉及到大量的内存分配和CPU资源消耗。为了优化用户体验,异步加载技术被广泛应用于此类场景,避免阻塞主线程,使得应用程序能够保持流畅运行。...
Error 1935 | Assembly component Microsoft.
VC
80.CRT
3. **系统
文件
损坏或缺失**:系统中的某些关键
文件
可能已损坏或丢失,导致安装失败。 #### 解决方案 ##### 方案一:重启计算机 - **操作步骤**:首先尝试简单地重启计算机,然后再重新启动Adobe产品的安装程序。 -...
VC
++(VS2010)读写Excel
文件
代码(附示例)
2)将Export2Excel.h,Export2Excel.cpp两个
文件
添加
到项目; 3)包含头
文件
,#include "ExcelLib/Export2Excel.h" 通过以上步骤在程序中引入了可以读取Excle
文件
的CExport2Excel类; 5、打开excel
文件
通过...
VC
,C#访问USB端口类
1. 设备枚举:类可能有一个方法来枚举所有已连接的USB设备,通常通过遍历注册表或使用ManagementObjectSearcher类查询WMI(Windows Management Instrumentation)来实现。 2. 驱动程序安装:如果需要,类可能包含...
VC.NET
7,539
社区成员
27,671
社区内容
发帖
与我相关
我的任务
VC.NET
.NET技术 VC.NET
复制链接
扫一扫
分享
社区描述
.NET技术 VC.NET
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章