社区
VC.NET
帖子详情
请问vc.net怎样添加已有的.cs文件
xinustc
2009-03-24 07:37:38
想通过实例学习,可是连运行都不会 汗...
如果直接打开则编译不用,通过新建项目,却不知道怎么添加.cs文件,高手莫笑
...全文
132
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
的效率问题
前几天用2008编写了一个
文件
的读取过程。
文件
格式是S-57标准的海图数据。借用了网上现成的Parse57中的
文件
格式分解读取模块。然后将内容读取后记录到自己的SENC数据结构中。代码并不是很麻烦,关键是,常常屏幕中同时需要显示几幅海图,才能将屏幕填满;而且除了读取SENC海图数据外,还需要进行海图要素的显示,以及海图上层功能的显示。因此,数据处理的速度是个很重要的问题。如果速度慢,那
C#常见错误_
CS
0006未能找到元数据
文件
在理解这个错误之前,让我们先了解一下什么是元数据
文件
。元数据
文件
是指
.NET
程序集中包含的一组信息,包括程序集名称、版本号、作者、创建日期等等。这些信息被用来描述程序集的内容和特性,并且可以被其他程序集引用和使用。在
.NET
编程中,元数据
文件
扮演着非常重要的角色。
如何把.
cs
文件
编译成DLL
文件
如何把.
cs
文件
编译成DLL
文件
开始–程序–Microsoft Visual Studio
.NET
2013–Visual Studio
.NET
工具,点击其中的“VS2013 开发人员命令提示”,就会进入Microsoft Visual Studio
.NET
2013命令提示窗口, 输入命令:
cs
c /out:d:\test\test.dll /t:library d:\test\test.c...
快速掌握
VC
6.0中各种宏注释(附图)
为了方便别人或自己阅读自己的程序,注释是坚决不可少的。一个漂亮的程序,不是在于你应用的技术多么高深,而是能够把高深的技术描述的清楚易懂。 在Java的IDE环境——Eclispe中,有很多中注释的,并且设置注释也是很方便的,因为现在从事C++,嘻嘻,Eclispe已经卸载,至于设置注释的地方,直接百度或谷歌即可。 所以嘛,习惯了Eclispe的注释,所以想法设法,在
VC
6.0中尝试。当
.aspx
文件
与.aspx.
cs
文件
的关系(转载)
aspx和对应的.aspx.
cs
是一个页面一个代码,页面基本上只负责显示格式之类的, 而所有的服务器端动作都是在aspx.
cs
中定义的。也就是说他们其实是一个东西的两面, aspx中所有服务器端控件都可以在对应的aspx.
cs
中使用,反之亦然,当然也可以定义对应的动作, 如果是在IDE中开发的话,不需要你进行任何额外的工作。 而在编译之后,aspx.
cs
变成了bin目录下的...
VC.NET
7,539
社区成员
27,670
社区内容
发帖
与我相关
我的任务
VC.NET
.NET技术 VC.NET
复制链接
扫一扫
分享
社区描述
.NET技术 VC.NET
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章