当前位置:网站首页>C#/. Net phase VI 01C Foundation_ 02:vs2019 basic operations, excluding code files, smart tips, data types, differences between float and double, and differences between string and string
C#/. Net phase VI 01C Foundation_ 02:vs2019 basic operations, excluding code files, smart tips, data types, differences between float and double, and differences between string and string
2022-06-26 07:23:00 【Ordinary overtime dog】
List of articles
List of articles
Smart tips
Red wavy line : Compile error prompt ( Compile not pass )
Yellow wavy line : Warning tips ( Out of date )
Green wavy line : Not used ( Extra code , You can delete )
Debug 、Release What is it?
In fact, when you click start, you will
Execute build first , Restart ,
So it actually seems like a step , In fact, two operations are performed automatically 

Project type :
1、Debug Debug version ( Usually in the development stage is this version )
2、Release The release ( Official version )


*exe.config This is the one in the project App.config, It should be noted that .netCore/.Net5 Then it was a little different , It's been like this before 
1、Debug Debug version ( Usually in the development stage is this version )
2、Release The release ( Official version )
The difference between them is , In fact, the operation effect is the same ,
It's just Release Some underlying information will not be displayed , The user experience will be friendly when an error is reported
The function is as like as two peas. , After all, the code is the same
Some documents explain
App.config What is written in it will not be compiled , There are some configurations recorded
What is recorded here is The environment in which our program runs 
The workbench does not display irrelevant files , Like the one above 
If you don't want to see a file on the workbench
You can also receive exclusions , as follows ( Be careful , Exclusion will not delete )
After exclusion from the project , If you regret it again , It's fine too 
Why should there be an exclusion function
Because sometimes if our code is wrong , But I don't want to delete , Useful words ,
We can actually use this function , In this way, you can compile , Otherwise, the compilation fails , It doesn't work
I found the problem of the code later , Just add it in
The following two can also be deleted , Because these two versions are compiled ,
It means that it can be regenerated , As long as the code is , No problem at all 
Main method

The formal parameters in this , It's actually useless at present , In fact, it can be deleted , It is only generated by default when generating
How to be in vs Running programs inside
Shortcut key :
function :
F5
Ctrl+F5
Suggestions when learning the console Ctrl+F5
Ctrl+F5, Wait in the console
Receiving user information


\t tabs ,, Similar to spaces
data type
Why data types
1、 In order to maximize the rational allocation of resources ( Save memory )
The smallest unit of a computer
Namely 0 and 1 Bit
1Byte=8 The bit
1 Byte = 8 bit ( A byte is equal to 8 A bit )
1b and 1kb Is that what I mean
It's not
1b It's actually very small
1kb=1024b
1Mb=1024kb
1GB=1024MB
1TB=1024GB ( At present, the maximum capacity of hard disk is basically in this unit capacity )
1PB=1024T Billions of bytes
……
Why data types
For example , What data type does money use
float( Ordinary people )、double、decimal( Bill Gates, )
Age , Actually use short That's enough. , There should be no more than 1000 Years old

Reasonable application of data types can save memory
Of course , Be reasonable, as shown in the figure above , Otherwise you will report an error
such as
float and double The difference between


double Because the default is double type , So you don't have to add d There's no need for
and float Smaller
float > dolble > decimal
Suggest
When describing a student's score , Suggest using float
Describe the bank's huge amount of money decimal
There are differences between theory and Practice , That makes sense , Habit is a terrible thing
In theory, age should be short More reasonable , But in fact, we rarely tangle with this problem , In the actual development process, age is generally used int data type 
uppercase String And lowercase string What's the difference?
stay java There are very strict distinctions ,
Only capitalized String, No lowercase string
StringBuider( Thread unsafe , Highest efficiency , For single pass
StringBuffer( Thread safety , Efficient than String high , Multithreading )
stay Java Inside Basically in uppercase String, Because uppercase is a wrapper class , Lowercase is a variable type
and C# Inside , Basically in lowercase string, And capital letters can also , Capitalization String And lowercase string There is no difference in use
The only difference is String yes C# Framework .net framework Provided ,string yes C# Provided by itself ,, Usage in C# There is no difference
Why is it C# We used to use lowercase in it string Well , This is because lowercase string, We don't need to introduce any libraries , It can be used directly
C# It's basically in lowercase string( There is no difference in case and function )
bool data type

Summary
Red wavy line : Compile error prompt ( Compile not pass )
Yellow wavy line : Warning tips ( Out of date )
Green wavy line : Not used ( Extra code , You can delete )
Project type :
1、Debug Debug version
2、Release The release
function :F5
Ctrl+F5
边栏推荐
- Which of the top ten securities companies has the lowest commission fee and is the most safe and reliable?
- Pytorch builds CNN LSTM hybrid model to realize multivariable and multi step time series forecasting (load forecasting)
- Scratch program learning
- 数据中心灾难恢复的重要参考指标:RTO和RPO
- 一文深入底层分析Redis对象结构
- GMP model
- $a && $b = $c what???
- 13. Mismatch simulation of power synthesis for ads usage recording
- One chip realizes functions such as spray 𞓜 ws2812 drive | key touch | LED display | voice broadcast chip and simplifies the design of humidifier products
- Kalman filter_ Recursive Processing
猜你喜欢
![[recommend an entity class conversion tool mapstruct, which is powerful and easy to use]](/img/7b/43becce42192fb5e0469465aa27a36.png)
[recommend an entity class conversion tool mapstruct, which is powerful and easy to use]

oracle创建带返回值的存储过程并sql执行调用

In interface testing, several methods to verify the success of deleting interfaces

MySQL

Jemter 压力测试 -基础请求-【教学篇】

Massive log collection tool flume

ZRaQnHYDAe

安装homebrew报错汇总
![5,10,15,20-tetra (4-bromophenyl) porphyrin (h2tppbr4) /5.2.15,10,15,20-tetra [4-[(3-aminophenyl) ethynyl] phenyl] porphyrin (tapepp) Qiyue porphyrin reagent](/img/2b/837dfa0f80c31c2903927085c491df.jpg)
5,10,15,20-tetra (4-bromophenyl) porphyrin (h2tppbr4) /5.2.15,10,15,20-tetra [4-[(3-aminophenyl) ethynyl] phenyl] porphyrin (tapepp) Qiyue porphyrin reagent

The "big grievances" in the workplace are not only physically tired, but also mentally emptied
随机推荐
Solution to the permission problem when NPM install -g serve reports an error
Cocoscreator plays spine animation
3,3 '- di (3,4-dicarboxyphenoxy) -4,4' - diphenylethynylbiphenyldianhydride (bpebpda) / porphyrin 2dcofs (H2P COF, ZNP COF and cup COF) supplied by Qiyue
ES cluster_ block_ exception read_ only_ allow_ Delete question
Matlab linear programming model learning notes
Scratch program learning
How to publish function computing (FC) through cloud effect
一文深入底层分析Redis对象结构
QPS
Service interface test guide
C#实现给DevExpress中GridView表格指定列添加进度条显示效果——代码实现方式
QT basics tutorial: qstring
ES字符串类型(Text vs keyword)的选择
The first screen time, you said you optimized it, then you calculated it and showed it to me!
php array_merge详解
Shengshi Haotong enterprise wechat sector creates a digital ecological community
[image fusion] multimodal medical image fusion based on coupled feature learning with matlab code
ES cluster_block_exception read_only_allow_delete问题
oracle创建带返回值的存储过程并sql执行调用
蓝桥杯嵌入式学习总结(新版)