background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "C# switch"

input logo icon
Video tags
|

Video tags

#Java
Українською
#Java типи данних
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:02
Hello everyone And today we will talk about
00:00:04
the Switch or the switch and we need to
00:00:07
use it the Switch operator to
00:00:10
select one of the many blocks of code to
00:00:13
execute the
00:00:14
pattern is very simple the
00:00:16
keyword Switch then a certain
00:00:20
expressin or a certain variable or a certain
00:00:22
specific number and then a certain pattern
00:00:26
case is translated as a case that is, in the
00:00:30
event that we meet x, then we will
00:00:33
execute some block of code, then Brick,
00:00:37
that is, we stop the case of y, again a
00:00:41
certain block of code Brick, we stop, and if
00:00:45
you and I did not see any
00:00:47
match, the default block will work
00:00:50
and the default block will output some keyword
00:00:54
and then Brick is also used for it,
00:00:57
that is, everything is very simple And how it works, the
00:01:00
expression itself is calculated once,
00:01:03
the value of the expression is compared with the
00:01:06
value of each case, if there is a match, the
00:01:09
corresponding block of code is executed and the
00:01:13
keywords of the default brick will be
00:01:15
described further in our section, and in the
00:01:18
example below, one number was used of
00:01:20
the week to calculate the name of the day of the
00:01:24
week. That is,
00:01:25
pay attention. We have a variable intovaty,
00:01:29
we enter it with parentheses and then we
00:01:34
check. If our variable Day is
00:01:37
listed as 4,
00:01:41
we still do not know why it will be significant.
00:01:44
That is, it will be checked by the candle and the
00:01:48
variable it can be changed to be
00:01:50
if 4 yes 1 7 10 as much as you like,
00:01:54
exactly the one that our user initializes,
00:01:59
and if the variable D is equal to one,
00:02:03
then it will be output to the console, that is,
00:02:07
Monday, and how our data will be checked,
00:02:11
here is our variable D, it is equal to 4, and the
00:02:17
first case the first is equal to one one
00:02:21
is equal to four no this block is not
00:02:24
fulfilled then our case is equal to 2 And the
00:02:28
variable D = 4 is
00:02:31
also not a coincidence this code block is not
00:02:35
fulfilled then case 3 3 is not equal to
00:02:39
four is
00:02:41
not fulfilled and 4
00:02:45
ks4 = 4 here we already have there is a match
00:02:50
and we will have a Tuesday notification sent to the console
00:02:56
and then the Brick will work. When
00:03:01
we have a match and the block code
00:03:03
has worked, all other checks will not be
00:03:07
performed, no more checks will be
00:03:10
performed, and this is the essence of
00:03:13
our candle. And from the point of view of the block diagrams
00:03:16
here too, everything is very simple. Today, we
00:03:20
developed the variable, what is its value next, it is
00:03:23
denoted as a rhombus, and then we
00:03:28
have a check for the unit, we have already
00:03:31
sorted it out, twos, threes and 4s,
00:03:36
and it is the fourth block that will work,
00:03:40
that is, here we do not have a match, all
00:03:44
these blocks are not executed is not executed, and
00:03:48
where the program saw a match,
00:03:51
it enters this block,
00:03:55
performs the actions listed here, and then the
00:04:00
program exits to the very end. And either
00:04:06
it completes its work or
00:04:08
runs the following blocks outside the brackets of the
00:04:12
judgment candle, and when it saw a match,
00:04:16
everything else should not be run in any case
00:04:21
why exactly
00:04:24
because the
00:04:25
keyword Brick when all the scarves
00:04:29
reach the keyword Brick it
00:04:32
breaks out of the block of candles and this
00:04:36
will suspend the execution of additional code
00:04:39
and testing of the register inside the block and
00:04:43
when a match is found and the work is done It's
00:04:45
time for a break, no more testing is
00:04:49
needed, that is, the program in we
00:04:52
worked out as quickly as possible
00:04:55
And the break can save exactly this time of savings
00:04:58
because it ignores the
00:05:01
execution of all its other
00:05:04
block of codes
00:05:06
and the keyword default or
00:05:09
default
00:05:11
default is optional and defines a
00:05:15
certain code to run if there is no
00:05:17
match in the register Here we have
00:05:20
a look the same variable is
00:05:22
equal to four. But we have checks
00:05:25
for the number 6 and the number seven, and we do not have
00:05:30
any coincidence, and therefore the
00:05:33
default block will work,
00:05:35
which will display the notification looking forward
00:05:38
to the weekend and that's all. How it works in
00:05:42
our idea is very simple, that is, we have
00:05:46
some variable, for example, the same model,
00:05:49
which will be equal to, for example, seven
00:05:51
semicolons and we write Switch in parentheses,
00:05:56
we enter our variable D,
00:05:59
then we put curly brackets and start
00:06:02
case
00:06:05
case 1
00:06:07
colon Console in the rideline, for example,
00:06:11
here I will display
00:06:13
Monday
00:06:17
Brick and pay attention to the idea
00:06:21
yourself for everything does everything for us. I just
00:06:25
mainly press and it hurts. On the second day of
00:06:29
the week, we will have a
00:06:32
Tuesday
00:06:36
TH.com and the assistant does everything herself
00:06:41
because she offers case 3 tab
00:06:45
Enter tab we have the
00:06:48
third day it's the third day of the day
00:06:55
for us
00:06:58
case-4 similarly
00:07:02
we will already have Tuesday
00:07:07
Tuesday I apologize
00:07:12
semicolon
00:07:14
tab case 5
00:07:18
Enter and Fridays hurt
00:07:23
Brick
00:07:24
case 6
00:07:27
Enter tab we will have a stator
00:07:34
Brick and again case 7
00:07:38
Console write Line
00:07:41
and here we will have
00:07:46
Sunday.com .ua
00:07:47
and look at everything. In fact, the program
00:07:50
is done and I run it.
00:07:55
Here we have Sunday because the variable
00:07:58
7 = our case with Everything.
00:08:13
the range of our values,
00:08:15
which we do not process in order to
00:08:18
process all other cases, we must
00:08:21
apply the default,
00:08:24
that is, by default,
00:08:27
a colon,
00:08:30
and this is where we write Console write Line And,
00:08:33
for example,
00:08:35
error,
00:08:37
and in this case, the only thing is to put the furniture
00:08:40
in this case, we have processed everything with you
00:08:44
and nine and all other
00:08:48
values ​​will be shown to us already by PRO,
00:08:52
so it is also very simple here, but this is
00:08:58
such a typical program with you and me, and it is also with
00:09:02
you. Okay, cases can be nested,
00:09:06
and we
00:09:09
will talk about the nesting of cases already when solving tasks, what does it
00:09:13
allow? And what are the advantages of nested
00:09:16
cases?
00:09:17
I hope the topic of witnesses has become clearer to you,
00:09:21
and the only thing that needs to be noted is
00:09:25
that
00:09:26
Switch is a multiple
00:09:29
choice operator, that is, it differs from the conditions of
00:09:33
our conditions, which are
00:09:34
worked out using True Falls. And
00:09:38
here we note certain specific
00:09:41
coincidence and a certain specific case
00:09:43
for this coincidence and that's all. That's why the investigators.
00:09:49
They are very interesting and next time
00:09:52
you and I will solve the problems so that it is
00:09:55
clearer how it was used
00:09:58
today. Thank you for your attention until the next
00:10:00
meeting

Description:

#ukraine #c Оператор багатозначного вибору Привіт, якщо є бажання підтримати Український контент, https://dmytryi-krasn-y.diaka.ua/donate можете перейти за посиланням

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "C# switch" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "C# switch" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "C# switch" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "C# switch" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "C# switch"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "C# switch"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.