2021年3月22日

摘要: 一.有关索引器 using System; //indexer:一个对象可以像数组一样被索引namespace _015_索引器{ //索引器的写法 public abstract class IndexerName { //int index;//不能这么写去替换下面的int index,语法很严 阅读全文

posted @ 2021-03-22 20:54 Nicela 阅读(103) 评论(0) 推荐(0)


2021年3月17日

摘要: 一. using System;//属性,property//可以在类,结构体,接口中//属性本质是方法//field:域,字段//属性:不确定存储位置。set,get,访问器namespace _013_属性{ public class A { private int num; public in 阅读全文

posted @ 2021-03-17 22:26 Nicela 阅读(128) 评论(0) 推荐(0)

摘要: 一. using System; namespace _010_异常处理{ class Program { static void Main(string[] args) { try { } //catch (Exception e1)//这里的exception只能替换成异常的子类,如果写Exce 阅读全文

posted @ 2021-03-17 22:24 Nicela 阅读(107) 评论(0) 推荐(0)

摘要: 一.预处理器命令 #define PIusing System;//#define Degug//不能写在using之后//指导编译器在编译开始前对信息预处理namespace _008_预处理器命令{ class Program { static void Main(string[] args) 阅读全文

posted @ 2021-03-17 22:22 Nicela 阅读(98) 评论(0) 推荐(0)

摘要: 一:接口 using System; namespace _005_接口{ //接口默认是public interface IMyInterface { //一些常用的操作行为进行专门的封装 //属性,方法,事件 //接口的存在意义:可以弥补c#中类不能多继承的缺陷 void MethodIplem 阅读全文

posted @ 2021-03-17 22:19 Nicela 阅读(146) 评论(0) 推荐(0)


2021年3月16日

摘要: 1.类 面向对象程序设计实现信息封装的基础,是一种用户自定义类型,也称类类型 类中可嵌套类:比如一辆车(车类)包含轮子(轮子类) 命名空间外可以写类:命名空间是一种显性的约束而已 ,然而写不写在命名空间里对 语法没有影响。 函数无法写类:函数是种行为,行为和主体不能颠倒。 类默认是公有的,接口默认是 阅读全文

posted @ 2021-03-16 20:56 Nicela 阅读(135) 评论(0) 推荐(0)


2020年7月30日

摘要: #include<iostream>#include<cstring>#include<cstdio>#include<algorithm>using namespace std;const int N=1010;int g[N][N];int s[N][N];int n,m;int num;int 阅读全文

posted @ 2020-07-30 15:18 Nicela 阅读(91) 评论(0) 推荐(0)

摘要: #include<iostream>#include<cstring>#include<cstdio>#include<algorithm>using namespace std;const int N=100010;int a[N],s[N];int n,m;int main(){ cin>>n> 阅读全文

posted @ 2020-07-30 15:14 Nicela 阅读(72) 评论(0) 推荐(0)

摘要: #include<iostream>#include<cstring>#include<cstdio>#include<algorithm>using namespace std;double num;int main(){ cin>>num; double l=-10000; double r=1 阅读全文

posted @ 2020-07-30 15:12 Nicela 阅读(138) 评论(0) 推荐(0)

摘要: #include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int shu,num;const int N=100010;int shuzu[N];int shunum;int m 阅读全文

posted @ 2020-07-30 15:11 Nicela 阅读(85) 评论(0) 推荐(0)


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3