自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

转载 Git学习笔记

一. Git简介

2022-03-01 11:18:05 247

原创 C# 自动属性的作用和意义 Get Set

工作中我们会遇到 getset的用法public int Name{get;set;}其实是下面代码的缩略版本private string name;public string Name{ get { return this.name; } set { this.name = value; }}Set{name=value;}是给私有属性name赋值Get{return name;}是取出私..

2022-02-22 15:27:47 1692

转载 ASCII, UTF8, UTF16编码学习笔记

一. ASICII编码在计算机中,所有的数据在存储和运算时都要使用二进制数表示(因为计算机用高电平和低电平分别表示1和0),例如,像a、b、c、d这样的52个字母(包括大写)、以及0、1等数字还有一些常用的符号(例如*、#、@等)在计算机中存储时也要使用二进制数来表示,而具体用哪些二进制数字表示哪个符号,当然每个人都可以约定自己的一套(这就叫编码),而大家如果要想互相通信而不造成混乱,那么大家就必须使用相同的编码规则,于是美国有关的标准化组织就出台了ASCII编码,统一规定了上述常用符号用哪些二进制数来

2022-02-18 15:34:30 508

原创 Queue Task 02/16 O(1) Time complexity

namespace Stack_practice{ class MyQueue { private int[] array; private int head; private int tail; private int size; public MyQueue(int s) { array = new int[s]; head = -1; .

2022-02-16 17:49:20 174

原创 Queue Task 02/16 O(n) Time complexity

namespace Stack_practice{ class MyQueue { private int[] array; private int max; private int count = 0; public MyQueue(int size) { array = new int[size]; max = size; } .

2022-02-16 15:14:49 237

原创 Stack Task 02/15 O(n) Time complexity

namespace ArrayStack{ class MyStack { public int[] array; public int max; public int count = 0; public MyStack(int size) { array = new int[size]; max = size; } publi..

2022-02-15 17:08:06 172

原创 C#学习笔记(Stack and Queue)

1.Stack1.1 定义栈(Stack)代表了一个后进先出的对象集合,是C#的一种常用容器。栈是有顺序的,是一片连续的内存域,保持着先进后出的原则,由系统自动分配和维护。是编译期间就分配好的内存空间,因此代码中必须就栈的大小有明确的定义。表尾允许进行插入删除操作,称为栈顶(Top),另一端是固定的,称为栈底(Bottom)。1.2 使用创建Stack: Stack<类型> 名字 = new Stack<类型>(); //例如:

2022-02-14 17:29:23 165

原创 Array and List Task_v4

Revised Taskpublic int Length{ return MyList.Length;}public int Count{ return MyList.count;}public int ElementAt(int index){ if (index >= 0 & index < Count) { return MyList[index]; } else

2022-02-11 16:54:26 417

原创 Array and List Task

使用Array来实现List1. 函数定义思路public int Length{ return MyList.Length;}public int Count{ return MyList.count;}public int ElementAt(int index){ if (index >= 0 & index < MyList.count) { return MyList[index]; } else

2022-02-11 13:59:37 269

原创 C#类的用法

一. VS结构1.1 引用命名空间解决方案(solution)、项目(project)、类(program)的关系;解决方案中包括项目,项目中有类。Solution --》 Project --》 Program命名:using system --》namespace project --》class Program类似 京东 --》京东在线商城项目--》顾客类Main 函数是程序的主入口。C#中static void Main(string[ ] args)中的作用及解释_sa

2022-02-10 17:36:16 1088

原创 C#学习笔记(Array & List)

一. ArrayArray即数组,可以用来存储任意数据类型,但是需要说明size。数组下标从0开始,第一个元素对应的下标为0,接下来的下标依次递增。即:注意有几种不同的array类型,int & str & bool:int[] Nums = new int[5]{1,2,3,4,2};string[] cities = new string[3]{"xian","beijing","shanghai"}bool[] bools = new b

2022-02-10 12:22:05 2508

原创 Visual Studio 2022 控制台输出中文乱码处理方法整理

I initially encountered this issue in myvisual studio 2022 C# project. After long time searching in the Internet, I have organized several steps to solve this issue.我在使用visual studio 2022过程中遇到命令行窗口中文字符乱码的问题,显示乱码的主要原因是因为中文在代码中的编码与控制台的编码不一致。经过长时间的搜索,我最终按照.

2022-02-10 09:52:42 22201 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除