diff --git "a/19\346\235\250\346\235\250/C#kaos zliao/\347\261\273 \345\256\232\344\271\211.text" "b/19\346\235\250\346\235\250/C#kaos zliao/\347\261\273 \345\256\232\344\271\211.text" new file mode 100644 index 0000000000000000000000000000000000000000..ad7e53f5c0cc6156ad1c1ee0abd60f3b73eabf19 --- /dev/null +++ "b/19\346\235\250\346\235\250/C#kaos zliao/\347\261\273 \345\256\232\344\271\211.text" @@ -0,0 +1,77 @@ +类:class Students +写字段 + static string Name; + +对字段进行封装 +public static string Name1 { get => Name; set => Name = value; } + + +写构造方法 + public Students() + { + + } +对构造方法进行重载 +public Students(string name,~~~) +{Console.WriteLine($"学生的姓名为:{Name}"); + +} + +———————————————————— + +虚方法 与 重写需方法 + +虚方法:(在父类中声明,到子类中实现) public virtual void ffming(){} + +在类中 重写虚方法: +public override void ffming () + { 语句 + } + + +———————————————————— + + +快速 实例化 并 传递参数 + +Shape circle = new Circle() { R = 5.0}; +Shape 类 | 新对象 circle | 参数为 R字段=5.0 +再 对象.方法名 调用 方法 + circle.GetArea(); +自定义的 获取 面积的方法 + +—————————————————————— +定义抽象类 + abstract class Shape{ + +定义 **抽象方法** + public abstract void GetArea(); + **abstract 关键字** + + //5.定义矩形,继承抽象类Shape + class RectAngle : Shape + { + //长 + public double Length { get; set; } + //宽 + public double Width { get; set; } + //获取矩形面积 + public override void GetArea() + {**重写 抽象方法** + **override 关键字** + Console.WriteLine("矩形长:{0} 宽:{1} 面积:{2}",Length,Width,Length*Width); + 根据 所传递的参数的 不同 ,来调用 不同的方法 + } + } + +} + +————————————————————— + + +接口: + + + +———————————————————— + diff --git "a/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx" "b/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx" new file mode 100644 index 0000000000000000000000000000000000000000..40b79486a0b9a0fc529bff759eacfbbe54c3076f --- /dev/null +++ "b/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx" @@ -0,0 +1,35 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="个人简介作业.aspx.cs" Inherits="WebApplication1.WebForm1" %> + + + + + + + + + +
+
+ 用户名: *
+ 密码: *
+ 确认密码: + *
+
+性别: + + + + + *
+ + 年龄: + *
+ + 邮箱:*
+ + 详细地址: + +
+
+ + diff --git "a/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx.cs" "b/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx.cs" new file mode 100644 index 0000000000000000000000000000000000000000..64a496e3da2e91250fbadbfe97a1226d3167a272 --- /dev/null +++ "b/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx.cs" @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication1 +{ + public partial class WebForm1 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git "a/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx.designer.cs" "b/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx.designer.cs" new file mode 100644 index 0000000000000000000000000000000000000000..5e45eac56e9b03f5ca90e8469756f156b05e7364 --- /dev/null +++ "b/19\346\235\250\346\235\250/zye/\344\270\252\344\272\272\347\256\200\344\273\213\344\275\234\344\270\232.aspx.designer.cs" @@ -0,0 +1,89 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace WebApplication1 +{ + + + public partial class WebForm1 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// TextBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox TextBox1; + + /// + /// PW1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox PW1; + + /// + /// PW2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox PW2; + + /// + /// gender 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.RadioButtonList gender; + + /// + /// TextBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox TextBox2; + + /// + /// Email 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox Email; + + /// + /// adderss 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox adderss; + } +} diff --git "a/19\346\235\250\346\235\250/zye/\350\256\241\346\225\260\345\231\250.txt" "b/19\346\235\250\346\235\250/zye/\350\256\241\346\225\260\345\231\250.txt" new file mode 100644 index 0000000000000000000000000000000000000000..932d942d6c3246cb8ae61d72788b2b7ed160037f --- /dev/null +++ "b/19\346\235\250\346\235\250/zye/\350\256\241\346\225\260\345\231\250.txt" @@ -0,0 +1,59 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebFo78678668.aspx.cs" Inherits="WebApplication2.WebFo78678668" %> + + + + + + + + + +
+
+

ͳƵ

+ + +
+
+ + + + + + + + + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication2 +{ + public partial class WebFo78678668 : System.Web.UI.Page + { static int I = 0; + protected void Page_Load(object sender, EventArgs e) + { + + if (!IsPostBack ) + { + int I = 0; + } + + + + + } + + protected void Button1_Click(object sender, EventArgs e) + { I++; + Label1.Text = ""+I +""; + + + } + } +} \ No newline at end of file