随笔分类 -  C#

摘要:ASP.NET是什么? ASP.NET网站开发步骤 1、启动VS2019,新建项目,选择ASP.NET Web应用程序,点击“下一步 2、设置项目属性,点击“下一步” 3、添加Web窗体配置项 4、创建后,在项目右侧的解决方案资源管理器中右击项目名称,选择添加Web窗体 之后给窗体命名 完成后会自动 阅读全文
posted @ 2021-12-07 20:44 Arisf 阅读(3344) 评论(0) 推荐(0)
摘要:说明: 1. 采用C#语言开发. 2. 数据库使用SQLServer 2019 3. 对数据库的操作采用ADO.NET框架 展示图(部分): 部分代码: using System; using System.Collections.Generic; using System.ComponentMod 阅读全文
posted @ 2021-12-07 16:55 Arisf 阅读(1327) 评论(0) 推荐(0)
摘要:try { } catch(Exception ex) { //MessageBox.Show("","窗口") string type = ex.GetType();//类型 string message = ex.Message;//信息 MessageBox.Show(ex.StackTrac 阅读全文
posted @ 2021-11-17 11:21 Arisf 阅读(72) 评论(0) 推荐(0)
摘要:使用C#创建Windows窗体程序,实现文件资源浏览 创建Windows窗体程序 将Form的Text属性设置为“简单的文件管理器” 在窗体上添加SplitContainer、TreeView、ListView控件 TreeView控件的Dock属性设置为Left ListView控件的Dock属性 阅读全文
posted @ 2021-11-16 08:54 Arisf 阅读(787) 评论(0) 推荐(0)
摘要:首先设置一个groupBox,往里添加两个radioButton,分别命名为rb_male和rb_female, 并设置其中rb_male默认勾选,即Checked="true" 获取值可以用if else获取,但是选项少的话没有必要,看着太多; if(rb_male.Checked==true) 阅读全文
posted @ 2021-11-14 11:12 Arisf 阅读(1559) 评论(0) 推荐(0)
摘要:(1) 编写两个接口,接口 IShape 包含三个方法:initialize, getPerimeter, getArea。分 别进行初始化、获取边长和面积,其返回值均为 decimal。接口 IDisplayresult 显示计算结果。 (2) 编写两个类,Square(正方形)和 Circle( 阅读全文
posted @ 2021-11-13 09:42 Arisf 阅读(660) 评论(0) 推荐(0)
摘要:(1) 编写一个抽象类 People,具有”姓名”,”年龄”字段,”姓名”属性,Work 方法。 (2) 由抽象类 People 派生出学生类 Student 和职工类 Employer,继承 People 类,并 覆盖Work 方法。 (3) 派生类 Student 增加”学校”字段,派生类 Em 阅读全文
posted @ 2021-11-12 09:11 Arisf 阅读(314) 评论(0) 推荐(0)
摘要:要求: 二维数组的大小、数组元素的值在运行时输入; 程序有友好的提示信息。 using System; namespace sy1_5{ class Program{ static void Main(string[] args){ int count = 0;//鞍点数量 Console.Writ 阅读全文
posted @ 2021-09-20 20:30 Arisf 阅读(121) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; namespace sy1_4{ class Program{ static void Main(string[] args){ List<string> list = new List<string>( 阅读全文
posted @ 2021-09-18 21:14 Arisf 阅读(763) 评论(0) 推荐(0)
摘要:using System; namespace sy1_3{ class Program{ static void Main(string[] args){ int n = 2;//鸡蛋数量 while (true) { if (n % 2 == 1 && n % 3 == 1 && n % 4 = 阅读全文
posted @ 2021-09-17 15:02 Arisf 阅读(219) 评论(0) 推荐(0)
摘要:using System; namespace sy1_2{ class Program{ static void Main(string[] args){ while (true) { Console.WriteLine("请输入月份:"); Console.WriteLine("退出请输入:13 阅读全文
posted @ 2021-09-15 21:54 Arisf 阅读(354) 评论(0) 推荐(0)
摘要:using System; namespace sy1_1{ class Program{ static void Main(string[] args){ int x;//计算类型 double t_1, t_2, t_3;//三角形三边 double s_width, s_length;//长方 阅读全文
posted @ 2021-09-14 15:21 Arisf 阅读(616) 评论(0) 推荐(0)