文章分类 -  C#

摘要:/// /// 树结构帮助类 /// public class TreeHelper { /// /// 建造树结构 /// /// 所有的节点 /// public static List BuildTree(List allNodes) where T ... 阅读全文
posted @ 2019-11-10 23:36 海阔天空XM 阅读(349) 评论(0) 推荐(0) 编辑
摘要:环境:VS2017, .NET Framework 4.6.1, Win 10 Pro 创建表示层及解决方案: 创建类库项目:DAL层: 创建BLL业务逻辑层: 再创建实体层:(这一层也可以放再DAL建个文件夹) 删掉BLL,DAL,Entity层类库项目自带的Class1.cs 在Entity层创 阅读全文
posted @ 2019-04-19 23:45 海阔天空XM 阅读(175) 评论(0) 推荐(0) 编辑
摘要:三层结构,是我们学习设计框架最早接触的项目搭建方式,我们通过一步一步来进化我们的项目结构。 一、首先建立一个控制台项目,如下: 一开始,为了不分散我们的注意力,我们把所有的类全部写在Program.cs文件里,这样很直观,一眼就能看到全部代码结构。 需求:在控制台展示学生的信息。 分析:先定义一个学 阅读全文
posted @ 2018-10-10 16:28 海阔天空XM 阅读(539) 评论(0) 推荐(0) 编辑
摘要:记录开发中一些小技巧,可以极大方便的简化问题。 阅读全文
posted @ 2016-10-25 09:57 海阔天空XM 阅读(228) 评论(0) 推荐(0) 编辑
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Data; 4 using System.Data.Entity; 5 using System.Linq; 6 using System.Net; 7 using System.Web; 8 using System.Web.Mv... 阅读全文
posted @ 2016-05-24 11:57 海阔天空XM 阅读(818) 评论(0) 推荐(0) 编辑
摘要:简单来说sql查数据库,而Linq查对象。这个对象必须是 Linq主要包括4个组件:Linq to Objects,Linq to SQL,Linq to DataSet,Linq to XML 思考Linq查询的3个步骤:1、确定数据库源 2、编写查询表达式 3、执行查询方法 Linq最基本的4个 阅读全文
posted @ 2016-04-06 14:13 海阔天空XM 阅读(241) 评论(0) 推荐(0) 编辑
摘要:1 //----------------------------------------------------------------------- 2 // 3 // Copyright (c) YuGuan Corporation. All rights reserve... 阅读全文
posted @ 2014-11-17 08:43 海阔天空XM 阅读(343) 评论(0) 推荐(0) 编辑
摘要:虽然可选参数和命名参数在Visual Basic中已经存在一段时间了,但在.NET 4发布之前,它们不能再C#中使用。可选参数允许为方法的一些参数提供默认值,并允许使用者重载类型,因此,即使只有一个方法,也能处理所有变体。下面是一个例子:public void CreateUser(string ... 阅读全文
posted @ 2014-07-22 21:54 海阔天空XM 阅读(206) 评论(0) 推荐(0) 编辑
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace 隐式类型的数组 ... 阅读全文
posted @ 2014-04-28 10:02 海阔天空XM 阅读(557) 评论(0) 推荐(0) 编辑
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace ConsoleA... 阅读全文
posted @ 2014-04-28 09:17 海阔天空XM 阅读(944) 评论(0) 推荐(0) 编辑
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace test1 8 ... 阅读全文
posted @ 2014-04-28 00:26 海阔天空XM 阅读(169) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data;using System.Data.Sql... 阅读全文
posted @ 2013-12-06 14:04 海阔天空XM 阅读(250) 评论(0) 推荐(0) 编辑
摘要:新建一个WinForm项目,在工具栏里拖一个dataGriView到窗体中,默认名称为dataGridView1,把数据源添加到dataGridView1中,运行,看到dataGriView1有数据显示,但没有行编号,所以我们需要添加一列,用来显示行号,以便我们知道这是第几条记录。选中dataGri... 阅读全文
posted @ 2010-12-25 02:01 海阔天空XM 阅读(9251) 评论(2) 推荐(4) 编辑

点击右上角即可分享
微信分享提示