当前位置:网站首页>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
边栏推荐
- 大厂面试TCP协议经典十五连问!22张图让你彻底弄明白
- Shell programming - user information management
- Typescript: use polymorphism instead of switch and other conditional statements
- How to convert Unicode into Chinese characters in Excel
- Procedure macros in rust
- Jemter 压力测试 -可视化工具-【使用篇】
- 5,10,15,20-tetraphenylporphyrin (TPP) and metal complexes fetpp/mntpp/cutpp/zntpp/nitpp/cotpp/pttpp/pdtpp/cdtpp supplied by Qiyue
- How can I find the completely deleted photos in Apple mobile phone?
- $a && $b = $c what???
- SQL query statement
猜你喜欢

MXNet对NIN网络中的网络的实现

MySQL

MySQL operation database

Here comes the apple ar/vr device exclusive system! Or named realityos
![5,10,15,20-tetra (4-methoxycarbonylphenyl) porphyrin tcmpp purple crystal; Meso-5,10,15,20-tetra (4-methoxyphenyl) porphyrin tmopp|zn[t (4-mop) p] and co[t (4-mop) p] complexes](/img/51/136eda75986fc01282558e626b2faf.jpg)
5,10,15,20-tetra (4-methoxycarbonylphenyl) porphyrin tcmpp purple crystal; Meso-5,10,15,20-tetra (4-methoxyphenyl) porphyrin tmopp|zn[t (4-mop) p] and co[t (4-mop) p] complexes
![[image fusion] MRI-CT image fusion based on gradient energy, local energy and PCA fusion rules with matlab code](/img/fc/fd81dedaa6b7c7542f9d74b04f247c.png)
[image fusion] MRI-CT image fusion based on gradient energy, local energy and PCA fusion rules with matlab code

Request&Response

Analyze 5 indicators of NFT project

Jemter 压力测试 -可视化工具支持-【安装篇】

Procedure macros in rust
随机推荐
[recommend an entity class conversion tool mapstruct, which is powerful and easy to use]
JMeter stress test web agent local interface test [teaching]
Pytorch builds CNN LSTM hybrid model to realize multivariable and multi step time series forecasting (load forecasting)
SQL
Matlab linear programming model learning notes
MySQL storage and custom functions
MySQL 'replace into' 的坑 自增id,备机会有问题
Shell input validation alphanumeric only
Jemter 压力测试 -基础请求-【教学篇】
In interface testing, several methods to verify the success of deleting interfaces
C implementation adds a progress bar display effect to the specified column of the GridView table in devaxpress - code implementation method
Typescript: use polymorphism instead of switch and other conditional statements
[feature extraction] feature selection of target recognition information based on sparse PCA with Matlab source code
Flutter (III) - master the usage of dart language in an article
In depth analysis of redis object structure
一文深入底层分析Redis对象结构
Zraqnhydae
item2安装配置及环境失效问题解决
Multisensor fusion sensing
. Net 20th anniversary! Microsoft sends a document to celebrate