网络科技公司网站建设策划东莞网站优化服务公司
- 作者: 五速梦信息网
- 时间: 2026年03月21日 08:16
当前位置: 首页 > news >正文
网络科技公司网站建设策划,东莞网站优化服务公司,龙华做棋牌网站建设哪家公司便宜,赣州seo公司上一篇#xff1a; C##xff0c;入门教程(06)——解决方案资源管理器#xff0c;代码文件与文件夹的管理工具https://blog.csdn.net/beijinghorn/article/details/124895033 创建新的 C# 项目后#xff0c; Visual Studio 会自动创建一系列的目录与文件。 程序员后面的工…上一篇 C#入门教程(06)——解决方案资源管理器代码文件与文件夹的管理工具https://blog.csdn.net/beijinghorn/article/details/124895033 创建新的 C# 项目后 Visual Studio 会自动创建一系列的目录与文件。 程序员后面的工作就是在这个目录及这些文件的基础上进行的。 本文对这些目录与文件做一个概要性的解释。 一、目录 1、默认的目录 Visual Studio 默认创建 3 个子目录及下层的目录。 \bin -–Debug -–Release \obj -–Debug -–Release \Properties \bin 目录保存项目生成的程序集(.exe 或 .dll) \bin\Debug 保存“调式版本Debug”模式的文件一般都是在这个目录下能找到可执行文件 .exe \bin\Release 保存“正式发布版本Release”模式的文件 \obj 目录保存项目的编译临时文件一般无需操心 \obj\Debug 保存“调式版本Debug”模式的文件 \obj\Release 保存“正式发布版本Release”模式的文件 \Properties 目录保存项目相关的一些设置信息一般无需阅读与修改。 2、改良与更好的目录结构 建议在工程目录下创建 App_Code 子目录用以保存工程相关的所有 namespace 的 class 文件。 并且按类别予以区分。比如幸运之门50018.COM的目录结构 \App_Code \App_Code\Basic 存储常用的 Helper 类的基础静态类 \App_Code\K50018 存储核心数据分类代码 \App_Code\K50018\Basic 数据分析的基础代码 \App_Code\K50018\Entity 数据体从数据库、文件获得的相关代码 \App_Code\K50018\Algorithm 数据分析的算法代码 \App_Code\K50018\Graph 生成走势图表等分析结果的代码 。。。 请举一反三 二、文件 工程相关的文件分类两类1.cs 是C#源代码类2.else 其他类 1、.sln 解决方案solution文件 .sln 是解决方案的配置文件保存着项目project和解决方案的关系。 这个文件也是双击打开 Visual Studio 的默认文档。 Microsoft Visual Studio Solution File, Format Version 12.00
Visual Studio Version 17
VisualStudioVersion 17.1.32228.430
MinimumVisualStudioVersion 10.0.40219.1
Project({FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}) Desktop, Desktop.csproj, {D87DE9F7-951F-4392-A24B-64DF168191CA}
EndProject
。。。
2、.csproj 工程项目C sharp project文件
.csproj 为c sharp project的缩写。 .csproj 项目文件保存着源代码、其他文档、资源和本项目的归属关系。 用编辑器推荐韩国人写的Editplus!打开 Desktop.csproj 文件可以看到类似这样的XML内容
。。。
ItemGroupCompile IncludeApp_Code\K50018\Basic\Statistics.cs /Compile IncludeApp_Code\K50018\Algorithm\Prime.cs /Compile IncludeApp_Code\K50018\Graph\Trend.cs /
。。。Compile IncludeForm1.csSubTypeForm/SubType/CompileCompile IncludeForm1.Designer.csDependentUponForm1.cs/DependentUpon/CompileCompile IncludeProgram.cs / 。。。
3、App.config 项目配置文件
App.config 一般是这样的XML内容。
?xml version1.0 encodingutf-8 ?
configurationstartup supportedRuntime versionv4.0 sku.NETFramework,Versionv4.7.2 //startup
/configuration
4、Form 相关文件
1Form 相关
Form 是指软件的窗口。Form 相关文件是3个一组。
Form1.cs 窗口事件处理的源代码 Form1.Designer.cs 窗口设计的源代码初学者略过 Form1.resx 窗口设计的资源信息初学者掠过
Form1.cs 一般是这样的内容
// 引用系统的命名空间
using System;
using System.IO;
using System.Text;
using System.Data;
using System.Linq;
using System.Drawing;
using System.Threading;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Windows.Forms;// 引用自己开发的命名空间
using Legalsoft.K50018;namespace Desktop_Application
{public partial class Form1 : Form{// 默认构造函数public Form1(){InitializeComponent();}// 窗口加载时候的处理private void Form1_Load(object sender, EventArgs e){}// button1 点击事件的处理private void button1_Click(object sender, EventArgs e){//一般的代码都从这里起飞}}
}
Form1.Designer.cs的内容一般这样
namespace Desktop_Application
{partial class Form1{/// summary/// 必需的设计器变量。/// /summaryprivate System.ComponentModel.IContainer components null;/// summary/// 清理所有正在使用的资源。/// /summary/// param namedisposing如果应释放托管资源为 true否则为 false。/paramprotected override void Dispose(bool disposing){if (disposing (components ! null)){components.Dispose();}base.Dispose(disposing);}#region Windows 窗体设计器生成的代码/// summary/// 设计器支持所需的方法 - 不要修改/// 使用代码编辑器修改此方法的内容。/// /summaryprivate void InitializeComponent(){this.panel1 new System.Windows.Forms.Panel();this.button1 new System.Windows.Forms.Button();this.panel2 new System.Windows.Forms.Panel();this.webBrowser1 new System.Windows.Forms.WebBrowser();this.panel1.SuspendLayout();this.panel2.SuspendLayout();this.SuspendLayout();。。。}}
}
Form1.resx 窗口设计的资源信息初学者掠过
?xml version1.0 encodingutf-8?
root!– Microsoft ResX Schema Version 2.0The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types.。。。–
/root 2更多的窗口
如果软件设计有多个窗口则就具有多个配套的文件。常见的有
欢迎窗口 Welcome.cs 窗口事件处理的源代码 Welcome.Designer.cs 窗口设计的源代码初学者略过 Welcome.resx 窗口设计的资源信息初学者掠过
软件配置窗口 Setting.cs 窗口事件处理的源代码 Setting.Designer.cs 窗口设计的源代码初学者略过 Setting.resx 窗口设计的资源信息初学者掠过
软件帮助窗口 Help.cs 窗口事件处理的源代码 Help.Designer.cs 窗口设计的源代码初学者略过 Help.resx 窗口设计的资源信息初学者掠过
再见 Bye.cs 窗口事件处理的源代码 Bye.Designer.cs 窗口设计的源代码初学者略过 Bye.resx 窗口设计的资源信息初学者掠过 三、更多的项目
压轴的都是精彩的
《幸运之门彩票网50018.COM》 有这样一系列的实际需求 1网站运行于 Windows Server 2008 之 IIS 的 Web 服务 需要 App_Code 下的所有代码支持的功能 2合作运行于合作伙伴 Linux 之 Web 服务 需要 App_Code 下的所有代码支持的功能 3桌面PC《蓝彩和app》 需要 App_Code 下的所有代码支持的功能 4安卓AndriodApp《蓝彩和app》 需要 App_Code 下的所有代码支持的功能 5苹果iOSApp《蓝彩和app》 需要 App_Code 下的所有代码支持的功能 6合作伙伴Unity游戏软件内的《CaiPiao分析》 需要 App_Code 下的主要代码支持的功能
于是在我的工程目录下就有了这样一些文件
App.config
Desktop.csproj 桌面PC软件
Desktop.sln
Web.csproj IIS网站,WEB服务
Web.sln
Linux.csproj LINUX,WEB服务
Linux.sln
MAPP-Andriod.csproj 安卓app
MAPP-Andriod.sln
MAPP-iOS.csproj 苹果app
MAPP-iOS.sln
Unity.csproj 游戏Unity app
Unity.sln
Form1.cs
Form1.Designer.cs
Form1.resx
Welcome.cs
Welcome.Designer.cs
Welcome.resx
Setting.cs
Setting.Designer.cs
Setting.resx
Help.cs
Help.Designer.cs
Help.resx
Bye.cs
Bye.Designer.cs
Bye.resx
重要的是仅仅只需要维护一个 App_Code
C# 是无与伦比的 下一篇
C#入门教程(08)——基本数据类型及使用的基础知识https://blog.csdn.net/beijinghorn/article/details/123906998
- 上一篇: 网络广告推广平台有哪些seo一般包括哪些内容
- 下一篇: 网络课程系统网站建设费用顺企网企业查询
相关文章
-
网络广告推广平台有哪些seo一般包括哪些内容
网络广告推广平台有哪些seo一般包括哪些内容
- 技术栈
- 2026年03月21日
-
网络广告代理渠道seo可以提升企业网站的
网络广告代理渠道seo可以提升企业网站的
- 技术栈
- 2026年03月21日
-
网络管理系统的基本组成和功能网站目录优化
网络管理系统的基本组成和功能网站目录优化
- 技术栈
- 2026年03月21日
-
网络课程系统网站建设费用顺企网企业查询
网络课程系统网站建设费用顺企网企业查询
- 技术栈
- 2026年03月21日
-
网络媒体广告公司百度seo一本通
网络媒体广告公司百度seo一本通
- 技术栈
- 2026年03月21日
-
网络品牌推广ppt关键词排名优化教程
网络品牌推广ppt关键词排名优化教程
- 技术栈
- 2026年03月21日
