上一页 1 ··· 3 4 5 6 7 8 9 下一页
2、自己实现strcpy函数//自己实现复制函数int strcpy_arr(char str1[], char str2[]) { for(int i=0;arr1[i]!='\0';i++) { arr[i]=arr1[i]; } arr[i]='\0'; }//3、自己实现strlen函数int strlen_arr(char str[])//3、自己实现strlen函数{ // int count=0;// while(*str!='\0') {// count++;// str++;// }// return count... Read More
posted @ 2013-10-23 21:54 lanacon Views(110) Comments(0) Diggs(0) Edit
今天学习了结构体。诶呀,结构体丫丫的。struct stu{int age;char name[20];float score;};今天的作业呵呵,对我来说还可以吧。不是那么难。//1、定义一个结构体变量(包含年月日),计算该日在本年中为第几天?要求写一个days函数。参数是此结构体类型的变量,返回值是整数。//2、模拟n个人参加选举的过程,四个候选人A、B、C、D。若选举某人直接输入其编号,最后按获得票数从高到低排序并输出候选人编号和票数。//3、某班5个学生,3门课,编写3个函数实现以下功能://(1)求各门课的平均分//(2)找出三门都不及格的学生,输出其全部信息//(3)找出3门课平均 Read More
posted @ 2013-10-23 21:46 lanacon Views(252) Comments(0) Diggs(0) Edit
1、找出一个二维数组中的“鞍点”,即该位置上的元素在该行中最大,在该列中最小(也可能没鞍点),打印出有关信息。//// main.c// andian//// Created by lanou on 13-10-22.// Copyright (c) 2013年 星星科技. All rights reserved.//#include #include #define N 3#define M 3 /* int i,j,k,max,maxj,flag; int a[N][M]={ {1,9,6} ,{2,7,5} ,{8,9,... Read More
posted @ 2013-10-23 21:30 lanacon Views(176) Comments(0) Diggs(0) Edit
在每次计算一段时间的时候,我们都要创建一个秒表,秒表不能重复使用。如果 想重复使用该秒表那么应该重置秒表。举例说明: static string strmapth = @"Data Source=.\SQLEXPRESS;AttachDbFilename=F:\C#练习代码\ConsoleApplication1\ConsoleApplication1\Testmdf.mdf;Integrated Security=True;User Instance=True"; static void Main(string[] args) { SqlC... Read More
posted @ 2013-08-20 15:00 lanacon Views(2228) Comments(0) Diggs(0) Edit
设计界面:向该form中拖入一个openfiledialog,重命名为:opfdImporttxt文件中的内容为:实现代码为: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Text; 8 using System.Windows.Forms; 9 using System.IO;10 using System.Da Read More
posted @ 2013-08-18 13:34 lanacon Views(646) Comments(0) Diggs(0) Edit
省市选择练习题:界面设计:当选择省后相应的省里面的市从数据库中读出。具体实现代码为: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Text; 8 using System.Windows.Forms; 9 using System.Data.SqlClient;10 using System.Data.Sql;11 Read More
posted @ 2013-08-18 13:20 lanacon Views(327) Comments(0) Diggs(0) Edit
概述反射和序列化反射:程序集包含模块,而模块包含类型,类型又包含成员。反射则提供了封装程序集、模块和类型的对象。您可以使用反射动态地创建类型的实例,将类型绑定到现有对象,或从现有对象中获取类型。然后,可以调用类型的方法或访问其字段和属性序列化:序列化是将对象转换为容易传输的格式的过程。例如,可以序列化一个对象,然后使用 HTTP 通过 Internet 在客户端和服务器之间传输该对象。在另一端,反序列化将从该流重新构造对象。11) XmlSerializer是如何工作的?使用这个类的进程需要什么ACL权限?我只知道XmlSerializer是将对象的属性和字段进行序列化和反序列化的,序列化成为 Read More
posted @ 2013-08-18 10:36 lanacon Views(269) Comments(2) Diggs(0) Edit
本文引自:http://blog.pfan.cn/edwardguo/53725.html用.net做B/S结构的系统,您是用几层结构来开发,每一层之间的关系以及为什么要这样分层? 答:从下至上分别为:数据访问层、业务逻辑层(又或成为领域层)、表示层 数据访问层:有时候也称为是持久层,其功能主要是负责数据库的访问 业务逻辑层:是整个系统的核心,它与这个系统的业务(领域)有关 表示层:是系统的UI部分,负责使用者与整个系统的交互。 优点: 分工明确,条理清晰,易于调试,而且具有可扩展性。 缺点: 增加成本。分层式结构究竟其优势何在? 1、开发人员可以只关注整个结构中的其中某一层; 2、可以很容易 Read More
posted @ 2013-08-18 10:34 lanacon Views(206) Comments(0) Diggs(0) Edit
首先的首先,感觉这篇文章不错,转来,提供原网址连接http://www.cnblogs.com/ndxsdhy/archive/2011/08/04/2127908.html 首先,MVC和三层架构,是不一样的。 三层架构中,DAL(数据访问层)、BLL(业务逻辑层)、WEB层各司其职,意在职责分离。 MVC是 Model-View-Controller,严格说这三个加起来以后才是三层架构中的WEB层,也就是说,MVC把三层架构中的WEB层再度进行了分化,分成了控制器、视图、实体三个部分,控制器完成页面逻辑,通过实体来与界面层完成通话;而C层直接与三层中的BLL进行对话。 所以,.net... Read More
posted @ 2013-08-04 13:50 lanacon Views(357) Comments(0) Diggs(0) Edit
首先第一步:创建一个 MigrationsCodeDemo控制台程序;第二步:添加最新版本EntityFramework NuGet package 到这个项目里:Tools –> Library Package Manager –> Package Manager Console.Run the ‘Install-Package EntityFramework’ command第三步:添加一个Blog类和一个继承自DbContext的BlogContext:?using System;using System.Collections.Generic;using System.Li Read More
posted @ 2013-08-04 13:38 lanacon Views(413) Comments(0) Diggs(0) Edit
上一页 1 ··· 3 4 5 6 7 8 9 下一页