当前位置:网站首页>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
边栏推荐
- ZRaQnHYDAe
- Porphyrin based polyimide (ppbpis); Synthesis of crosslinked porphyrin based polyimides (ppbpi CRS) porphyrin products supplied by Qiyue biology
- Jemter 压力测试 -可视化工具-【使用篇】
- Liquid crystal texture diagram of purple solid mm-tpp-10c methacrylic acid decanoxy tetraphenyl porphyrin and mm-tpp-12c methacrylic acid dodecanoxy tetraphenyl porphyrin - Qi Yue display
- The difference between insert ignore and insert into
- SQL
- $a && $b = $c what???
- Stm32f1 and stm32subeide programming example - thermal sensor driver
- Jemter stress test - visualization tool - [usage]
- How MySQL implements the RC transaction isolation level
猜你喜欢

3D porphyrin MOF (mof-p5) / 3D porphyrin MOF (mof-p4) / 2D cobalt porphyrin MOF (ppf-1-co) / 2D porphyrin COF (POR COF) / supplied by Qiyue

Cocoscreator plays spine animation

Mxnet implementation of network in Nin network

. Net 20th anniversary! Microsoft sends a document to celebrate

How to quickly merge multiple PDF files?

Porphyrin based polyimide (ppbpis); Synthesis of crosslinked porphyrin based polyimides (ppbpi CRS) porphyrin products supplied by Qiyue biology
![[image detection] image target size measurement system based on morphology with matlab code](/img/b4/87c9b1dc3e6fdf6bd58ee7d5a8f37b.png)
[image detection] image target size measurement system based on morphology with matlab code

The performance of iron and steel enterprises was expected to be good in January this year. Since February, the prices of products of iron and steel enterprises have increased significantly. A mighty
![[image detection] image saliency detection based on ITTI model with matlab code](/img/f3/a8b13431724059f8c8a77961778c67.png)
[image detection] image saliency detection based on ITTI model with matlab code

MySQL basic usage 01
随机推荐
The performance of iron and steel enterprises was expected to be good in January this year. Since February, the prices of products of iron and steel enterprises have increased significantly. A mighty
[feature extraction] feature selection of target recognition information based on sparse PCA with Matlab source code
[image detection] image target size measurement system based on morphology with matlab code
一项听起来大胆,并且非常牛逼的操作——复刻一个 Netflix
Oracle中计算除法——解决除数为零报错
[image segmentation] blood vessel extraction from retinal fundus images based on maximum principal curvature with matlab code
[image fusion] MRI-CT image fusion based on gradient energy, local energy and PCA fusion rules with matlab code
一文深入底层分析Redis对象结构
C implementation adds a progress bar display effect to the specified column of the GridView table in devaxpress - code implementation method
报错问题Parameter index out of range(0 < 1) (1 > number of parameters,which is 0
MySQL storage and custom functions
Request&Response
Iron / zinc / copper / platinum metal complexes such as 5,10,15,20-tetra (4-hydroxyphenyl) porphyrin (THPP) / (thppfe) / (thppzn) / (thppcu) / (thpppt) - Qiyue R & D
Young man, do you know the original appearance of kotlin association process?
Excel中Unicode如何转换为汉字
Which of the top ten securities companies has the lowest commission fee and is the most safe and reliable?
[image fusion] multimodal medical image fusion based on coupled feature learning with matlab code
Es string type (text vs keyword) selection
Redis系列——5种常见数据类型day1-3
SQL