Hi, friends. Welcome to Tu Plus Funny Channel. Today. I'm going to teach.net core
Today is the first day. Uh Let me see, right? So nowadays all the developers are using.net core
What is the difference between.net framework, and.net core? Here, I have a I just type on Google
here. This one should be.net core and.net framework different here. Developers use.net framework to create the Windows
application and server based application so.net core used to create the server application that run on indoors
relax and Mac, right? So here what is the thing is here the advantages you can run any operating system if you are using
the.net code, it is it is recently it will be released. OK
So you can use any operating system, whether you can use Mac or Linux or Windows or Fedora in every
operating system you can run. OK? That is the advantages of.net code in.net framework
You can't do it. OK? Only then that's why the Microsoft introduced a new uh new thing.net code
OK. This is a difference between.net framework, and.net code right now, let me see how to install the uh visual studio
Uh the late of version you must install uh then you will be able to get more functionality
So you just go to the Windows uh Visual Studio 2019. If you type on Google
you will be get the result like this. OK? Yeah. If you click on this one
it is called to the respective website for download Visual Studio 2090 right
So when you download the uh version, OK. If you are here
if you are go here, there will be the 23 choices are there uh committee community edition
Professional Edition and Enterprise Edition here. Uh The if you click download here
you can see uh only the Microsoft given us only the community edition for free
Others are they they include the charges, right? So if you are going to the download
you will be able to see the charges, right? The community isn't the free, right? This is not a free
this is all the charges, right? Uh Here community edition, you will be able to work OK
It's no problem. So if you want to add some more here
you can read whatever they are given for enterprise edition and professional edition
So uh if you like to buy, you will be able to buy here
right? Enterprise of Professional, you can buy here, right? So here if you are the you are using on the integer for studies
purpose on everything you can use it for free, right? If you click on this one
you will be able to install it. OK. I also install the uh community edition only
OK? All right. So when you install the community edition, you will be able to get it here
Go to the here. Visual studio 90. OK. This is one. OK
If you click on this one, this is this one should be the community edition right here
OK. If you click on this, you will be able to see the screen like this
We should show the screen here. There will be the get start. All these things are there
First we have to create a new project, click on this, create a new project
right? You will be get the uh user interface look like this
right? So here you can notice that here. This is why I told that it is a platform independent
You will be, you can see any operating system, you will be able to run that programming
So here uh here you can choice here. Windows apply T sharp Windows
OK? Here you can choose the operating system or Windows or Linux or any operation you can
So OK. Here I'm choose, I'm uh I am uh working on Windows machine
So we have to use Windows. So here what is the app uh application you are going to run here
console of uh console or desktop or what is the operating system
Uh What is the application you can run here? C# right? So you will be able to search over here
right? If you want the Windows application, you can cha uh you have here
Windows, it will be displayed the relevant right? Windows. Ok. Here it will be search and display
Ok. Now I'm going to the first time I'm going to use the console application
So first we have to select the language C# uh Windows. This is our system
We are running on the Windows, we have which application you are writing now for the first time
I'm writing on console application. So we are click on console console
a console application here. You can see here, console, right? There's a window uh result will be displayed over here
right? So we we have no need in this one. The application, we can select the console
right? This is a console right here. You can see here.net CO, OK
You can have a two choices.net framework, and.net core. You select this one here
you can see here. OK? So here, click on this one and here it will show here C# Linux Mac Os Windows
all the stuff it will be running here in in uh dot net framework
You, you will be only running on Windows, only other platform. So there you can't run
And if you are uh if you make the setting here, if you choose the.net core
you can run any operating system, then ask or every operating system you can run
OK? Select the.net core. Next here you can give the console application name first
It's my first program. So I'm going to give first click create
Now, you are uh first place already. I already done this one
That's why it's right. First one, I agree with you right now
You you have some time to create this project. OK? Now
now you can see the project has been created successfully here. Its result is created he application of it
right? So here you can see on your right side, this one should be the dependencies here
These are the dependencies, right? All the classes are there. If you are expanding the dependencies
you can see all the inside the framework. Uh you have a a framework inside here
This is a.net uh core name spaces. These are all the name are right system
These are called as name face, right. OK uh system. This is this default available
this system here. Yeah, this is the name space, right. In order to run this control applications
this is the name which you are running. OK? This is a example
right? Program dot J CS S, this is the default class program dot CS s now let's run the application how to run the application
This is just one. OK. If you click on this one, it will be building
build your project. If there is any error, it will be successfully here
there is no issues found. It will be successfully show your result
Hello, OK. It will be running and show the directory and everything here
You no need this one. Here is simply right only. You need Hord only
So you right. Console dot right line here, red line, red line or red
right, red line me. This one should be the righto dot Right line me
you are writing Hallow World programming, red line me, it will be reading whatever you are writing
it will be reading. Ok? Ok. Now let's run and show the output
Here is Hallow only ha very simple program, right? These are we have write the program
very simple application. OK? You successfully run your uh dot net code first ha programming
Now, whatever name you can give here here, my name is Raja. So you can write Raja
you can run it. You will be able to see that result, Raja over here
All right. Very simple. OK? You can run it. OK? Now let me see how to add two numbers
So we have write 32 plus two. If you run it, you will be able to see the answer for these
Are we have to use the arithmetic operators? OK. So what are the operations are there
Plus control fee to copy to place here? This one should be minus division
sub OK. Multiply, right? So here we have to run and check
You can see all the results over here. Very simple. OK? So the the the programming
the codes are not different, only same right only that, that code will be the the framework will be changed as a code
This is, this is a simple example. OK? All right. This is a very simple one
Right now, I'm going to go to discuss about the construct of the class
right. So I'm going to create another class. OK? So very simple
This is the this class is programming. I'm going to create another class
OK? This is a inside the program. This is a class name program inside the class
We have a main method inside the main method we can run any program
right? So I'm going to give you any another class. This is a private class
right? So you have to write student, right? Student, open Calibri and close table
right? You know the important stuff, I'm going to tell you there are many students not aware of this stuff
OK? If you are not putting here uh uh put here the access before the class
it it automatically taken this class as a private. This is a class you can access
this is a private class. These are the private class, OK? If you make as a public class
you can make here as a public OK. OK. Whatever you can write the method of variable
you can access only through this class OK? Right. If you are put in your public
you can access anywhere of the program. Right now we access is a private class
Uh Yeah. You have to create a public, the public, you have to create the constructor
the same name. What is the name? Class name student? The same name
I'm going to create that. Sorry constructor. OK. What's the constructor? What is the class name
The same name? You have to create the method name? OK. So we are called desk constructor
OK. What is the class name? The same name? The method should be there
It's called S constructor. OK. Right. After that, this is a public method
This is the, this is called uh empty constructor. We are we
we are we not pass any argument. So we are called as this constructor as empty constructor
right? So how to, how to look uh look like a parameter is constructor
So the same thing can control, copy, control, paste here here we have to specify the value
So in a comma in B right, in
A in P OK, these are the called as parameters. These are called as parameters
You can, if you move the cursor, it will be showing in the A parameter
If you go here it move the cur, this is also parameter. It is called B in B
It's also parameter it show here. OK. It's automatically uh dot net core framework
will be usually it will be. So this is the frame uh parameter
right? So now here I'm going to create two variables. So what is a variable I'm going to create
here? Is public. I'm going to create a public variables. OK? These are called properties OK
Public variables in X A public variable. And I think you have to create public in
in means a data type in white, right? This is simple stuff
OK? This is called as variables. This is called as data type
This is called as access specified public. If you put the variable
uh if you put the uh public, you can access these variables anywhere of the program right now
here. This is a public method. OK? Uh We are running here
this X equal this year, we are equal to this year. Again
this why? Equal to B OK. Let's do the sticks right now
I'm going to create two matters below. You can check here. I'll be explaining it
Don't worry about that. This one called us properties, properties proper dish
These are called as properties. Now, I'm going to implement the methods
methods. This one, first one should be public in ad it's a method here
written, we had to put a written keyword, written X plus Y
I hope you all uh learn these things. I hope you all learn about uh about these things
If you are put the ink mean it will be written. If you are putting the void
it won't return. If you put the ink here, they right here
it will be written OK? So it's a method if you are creating a method like this you have create M two methods
One is that another one is a multiply M the flight multiply multiply anything
OK? Now you can see here X now bright lines, OK. This I think we are correct
OK? Methods right now here you can see here this is the call as properties OK
Now if I run this program, what is output, nothing will be output
There is no output because if you are writing here, I haven't called things
If you are running here, if you aren't running here, you have to instantiation too
Here. You have instantiation, the class. OK? So first, what I'm going to do is here
We have write the instantiation here. So we have write instantiation, you write student
class, name, student, you have to create the object of the class, student, class and create object student equal
you have to write the student class, right? So now what I'm going to do is here
you can see here the student, I'm going to access that this also to the public
So we can easily access the student dot XX equal
you write the value 100 against two dot Why equal
200? Now, I'm going to call this method, whichever method you can print the value
So I'm going to write here in dot Equal student. What's the method
We are calling a method? First, we have to call a method. So you can see the result
What is a result only? OK? So you have to write the console dot right line to print and C dot Bright line
Do you can see the result over here right now? What I did here is so I'm going to
print that I have to uh give the value of uh X for X mean this one
right? This a public, these are all the things are public area uh properties
So you have to access the public method over here. So you have to write the X equal uh equal
Yeah, you see, you see this is the method. OK. This argument this is the property set it here
This is the set it here, right. OK. This is a class level data
right? This a parameterized data. That's the uh difference, right? This is a class level data
This is a parameterized data. The class data, class level data we have set into the parameterized data
right. So when you student dot X equal hun uh 100. So it is coming
here. Uh uh What happened is it is calling the method which method a method I'm going to call you are
assigning this variable. You are given here X equal uh 100 Y equal
you are here 200. So after that, we have to create a variable in dot Equal student and dot add if you call that but
method what happened? It goes here. What are the value you entered here
102 100? It will be added and show the answer over here
right. So let's run and check, right click and you can run here
You can run here. You'll be able to see the answer is 300
OK. After that, if you are, if you are, instead of the A function
you have to add and multiply, we have created two functions multiply
And it first, if we call it here, you can see the answer which one should be the multiply and show the answer
I hope you guys you understood so far in my next tutorial, I'm going to explain the object oriented concept in uh dot net co
Thank you for watching. If you like my channel, please subscribe me like me. Thank you for watching
Hi friends. Welcome to T plus Funny Channel. This is the part two tutorial of.net core application
Let's continue this. So here today, I'm going to explain how the Get set method works
right? So that I have bring this video. There are many students who ask me from that how
how the get and set method working in C# dot net co OK
This is very important stuff. When you are writing the program. In my last class
I saw you how to open the.net core and everything. Those who are not watch that video
I I gave the uh video description below the part one.net introduction.net core introduction video
You just go and watch it. OK? Right now here first what I'm going to do is this is a sample class
right? This is when the program is we are open it it look like this
right? So here I have created a class here class I have created a class person
right? When the classes started here closing here, right? So this is the main method of the program
right? This class inside the class, I am going to create another class which name is person
right? This class name is person. So here I have given the description
OK? But I have given the explanation get and set. OK. Set is a receiver input get is a sent
out. OK. This is the receiver part, this is the get part right
Get is a send part set is a receiver, right? So here what I did here is I have create two
variables here. So how to create the variable? Simply you can create like a get a set method here to create like this pr op
sorry pr or P OK. This one you have to press tap key two times you
can get it here. OK? I know uh OK. You can get it here. This is this how you can get it right
Again, I'm going to tell you pr op plus T two times you can get this
It's very simple. OK? This is how you have to generate that get and set method
Very simple way you are using in.net co right? So I have here we have to
again, I'm going to pr op plus step key two times you can get it integer
net salary. We have to write like this. Very simple. We are quite like this. OK
That's how we create the variable. OK. This we outset first one is the get and set method
Uh Other things we know needed, we only get set method, we only
we can check, right. OK. OK. Only one variable I have in a variable created we have set the get and set method
Now here after that inside the class, I have create one method which is a salary increase
right? Salary increase. I am going to create money at that. OK? OK
Increase month, three month, three month, right? OK. This function is started and closing it right
So here we have to uh but the RC had called now here
What I, what I did here is I have a written net salary plus 1000
What I, what I did here is I have already created the variable here you have to get this variable
Uh If you create the function using the data type over here
the function must return. OK? If it is for uh put it here
right? The it, it, it won't return. OK. So you must create the written function using the ink
OK? In mean it will be, it should be written. OK? The function um the method should be written
OK? So written but I am going to return this net salary
increment 1000 ok. The net salary we have increment by 1000. It will be increment by increment by 1000
Ok. Now what I did here is so how this system works would be person
OK? Person is a class. So we have to create the class name here
You have to create the object P equal new person. So if you are using the new keyword
we have created the object of P. So P dot You can see here P if you press dot It will be generated
the net salary, it will be coming from here, this class, right
So this class is coming from here. If you make it as a, if you are uh if you delete the private public keyword here
now you can see here if you go here type P here
nothing will be displayed. Because if you are, if you are not put the public access specifier before the data type
if you are not specified here, the program will be understand, it will be the private
OK? We it will be understand as a private. So here if you remove this one
this matter also private, OK? So you eat it, it, you can't get it here
ok? There will be not nothing you will be getting here, right
So if it is a public only, you can access anywhere of the program
right? That is the meaning of public, public means you can access anywhere private means that within the class only
this is the class, this is within the class only. You can access the method and everything outside the class
You can, you won't be able to work with that. If you want to work with the outside the class
you must change as public. So that here now I have changed as public click here
you will be able to see the properties as net salary and increment
But this both are public. Now, I have to go to add the net salary as 303,000
right? Net salary 3000. After that, I'm going to go to calculate the salary increment
Ok? Otherwise you can save your bonus. Ok? So salary increment. Ok
Salary increment means 3000 plus 4000. If you enter the here is uh 6000
Yeah, what happened is now the salary should be 3000. So 3000 plus 1000 what happened is 4000
So if you write council dot right LP dot If you call this method
it will be calculated the net. Ok? Now let's try and check what happened there but what the output you can check code 4000
Ok. Now here you have a here, this is one should be the access
ok? So this is a access, this is the get and set method right now
Get out out the work, get and set method. Here you can stick here
get a set sir receiver, get us a sender. So if you are put here as private
you can check what happened. It showed error because here here it will be received the value but the value you are entered here
it will be received the value. If you are put as private
it won't be allowed to write here. OK? Now imagine if you put the private method before
the get what happened, this very important stuff, what happened now it will be work
ok? It will be work, ok? Now it will be program should be work
Now again, you have to import the salary. Now if you want to print the net salary
what is net salary? You are entered here only you have to display the salary uh as a consult
it won't be allowed. Ok? It will be sure right now forget it did work
Now you can see the output. What happened? It both are working 7000 are working
If you are put it here as private, it just send, send out it for
This is a receiver receiver mean you can't tell out right here if it is if it is put before the get it showed error
Ok? This one should be a good example of enter the pin number
It won't show you, ok? Just enter the pin number, it won't show you
ok. This is the security purpose we are using uh we are using this get and set method
In my next video, I'll be uh making a simple example of an calculation how the system works
right? That is that is very important program in my next tutor, I'll be explained very
very clearly uh using an cation, right? It is very helpful to do your future project
right? So, and we are we are using to uh using how to get set uh set method work and get uh get method work
We teach in my upcoming video in my next video. Keep in touch with our uh youtube channel
Uh If you like my, if you like my channel, please explain me like me
Thank you for watching. Hi friends. Welcome to tutors Funny Channel. Today
I'm going to teach.net course step by step tutorial. We have to discuss about the concept of and calculation and calculation
Uh I hope you, you you all study that uh simply we have uh look at the concept of and calculation
Uh data hiding data hiding me necessary data will show to the people unnecessary data
We are hiding. There is a pur purpose of and calculation only necessary data we all show to them uh people unnecessary data
we are hiding, right? A good example of the O machine, right
Only we uh we outs show the people how to on the machine
uh how to do the basic functionality on everything to the people
Uh unnecessary data. I mean how the electricity works, other stuff. Uh how works and other function ID
that's all the stuff. Yeah. Right. That's a good example of the O, right
So now let's move into the practical, right? So this uh en calculations uh things how to do in our.net core
Now, let's say I'm going to open our.net. So I have installed the.net 2019
which was 2019. You must install this one. OK. So now here create a new project right
now here, I'm going to select S dot Console application.net code, right
Click next. Now we I am going to create an calculation and
capsulation, create project location. I have Levita as it is. Uh
now the project uh project, you have to take some time to create your project
Yeah. Now your project has been created successfully. You can see here the default has
been created right now, what I'm going to do is here, I'm going to create a
I had this uh programming class which is a default creator, right
This is a programming class. It default created. Now, I'm going to go to create another class
So this class is open, close it. So I'm going to create another class
right? So here the right class, right? Your class, uh we have to give the name
name, employee, you can create the client class name, any name, right
So I just create an employee class, open the bracket and close bracket inside the employee class I'm going to create the variable public
variable in employee number, right? OK. Now here we output the get and set method
get and set method right after the bureaucrat public in
basic salary, right? That's the thing, two things
we have created. OK. Now, here I'm going to calculate the one right
So here I just calculate the I have created another function public your great salary salary
in three month, three month. All right, we have to create the function
right? This one should be there, written type. So you have to put it as in here
right? So open K bracket and close daily bracket to close the function
right? So here, first, what I'm going to do is here, I'm going to create the uh condition
If employee number create a then greater than
500 return return 20,000
50,000, let's put it as 50,000. All right, else return
Else we return this one should be 30,000. All
right. So what I did here is the employee number. What is the employee number you entered here
There are, if you are looking at the company, there are many employees are working on the particular company
The em each employee has a unique identification number. So if the employee number above
500 the salary which is providing to the company 50,000
below 500 company will be provide the salary 30,000, right? This is the company rule
So let's how to now the function out to work OK? Now then function out to work on the main method
right? So here employee here your right. We have created the object E MP equal new
employee. Right now, we have created the object of the class. This is the class
this class, we have to get it here inside the main method. We have run this in order to run the programming
Now we have to create the object as E MP. So object, OK
We have to use the keyword new to create the new object. Now how to call this class
this variable right dot Employee number equal. I'm going
to put it here as uh fif 502 502. Now
I'm going to print the application whether it is working or not. Let me check console dot right line
OK. We have right uh inside the uh console dot write and we write this one
this class E MP dot Salary increment right
now. You can check here and palpation. Now what the output will be displayed
OK? If the employee salary you entered here as 502. So what happen is it will be returning the 50,000 of
the salary here. It will be returned as 50,000 salary. OK. That's the thing we have to display
Ok. Very basic salary calculation we are displayed here. OK? Now imagine that all the end calculation work over here
So now you can see here without uh and calculation. Now here uh you enter the employee number over here
right? OK. Now you are only enter, OK. Now, here, if you want to check the answer
you can't hear this number. What is the number you entered the employee number
Ok. You got here right now you get it will be uh E MP employee number
right? It's a public this one, right? This is not a function
Now you are right here, employee number. Now here you will be able to see
Now you can now here now your employee number also you could see and the balance uh your
salary will be here. You will be able to see, ok? Now if you calculate this one
so how to employ this one here when you are I I I'm only given uh when the employee number entered the uh they
can't see only we see only the salary increment, only the the seller
What is the employee number entered here? It, it will not show under the uh a consult
right? So how to do the task is here? You have to put it as a private in my last year
I explained this these two things, right? Private, private me, it will be
if you calling here, it will be the security, it will be data ID. OK
If you call it here, private, it will show there. OK? Only you can you will be able to view the data only
Uh you will be able to enter the data only set mean receiver of the data
That means send the data, right? We can't send the data, OK? Only the receive
OK? But the employee number you entered here, it will only be received
right? It it won't be, it won't be show, OK? Only to show that salary increment only now it showed the error
OK? Now if you put it here, it will be, it will be shower. This is the and part
right? It it hiding something else, right? Only you will be able to enter the employee
After that, you won't be able to see your employee number. OK
Good. The example of uh when you go to the ATM machine
you will be uh you, you just in uh insert your ATM card into the machine
The machine will be uh ask you to enter the uh account order password
If you enter the relevant password, it won't, will be displayed your password into the actual uh ATM machine
But the same thing there will be and calculate right? The same thing here as we have and like this
OK, this is imagine an employee number. It won't be here only here. So here only we have to get it
Uh sorry, here we will receive the uh password. It won't be so OK
that's why we are put it like this. OK? This is the essential way you write the programming
OK? This is how we outright the program, right? Ok. This is how we outright
Ok. Now, let me again, we have to check right. I book
Now imagine I'm going to change the employee number as F 200
What will be the output now? Sorry, not here. 202. What's our output
Now, let me, can you imagine? Yeah. Now routers
has 30,000 because this is the below 500. So it will be not the this condition will be failure
It will be go below. What is the ielts? We are returning 30,000
It will be displayed, right? It's simple program you will return, all right
this is the very simple stuff. Uh Here if you are put it to the private over here
you can check whatever it will be shown there. You can't input the data here
OK? This is the thing OK? Only we have to uh mostly we have to input only we have to get uh get
get also we have to put the private OK? For the and calculation uh purpose
right? We only the uh here we only input the data. We can't show the input here
Only we can input only the output, we can OK. That's why you have to put the private here
This is the good example of and calculation. Uh when you work on this one
the private uh the private exercise here we output OK. Get out the get set
get and set method work. This is a good example, right? Uh Don't worry about this
All the source code I will provide in my website to the.com website. Uh Thank you for watching
If you like my channel, please subscribe me like me. Thank you for watching. Hi
friends. Welcome to Toyota's Funny Channel today, I'm going to teach you about the enumeration in c.net co
Yeah, I already created the, I already opened the visual studio uh 2019
Here I create new project. So you have to select the court
right? Console co and click next. Yeah, I'm going to create the project name
Yes. You know. Right. Great. All right. My
new project is uh creating, you have to wait some time to create the project
Now, the project has been created successfully. Now, here I'm going to create the enumeration
So I'll do the task is first we have to start the keyword you
right? So we have to write this same thing I already written. So uh without wasting a time of writing here
this one for enumeration creating uh keyword you are use no uh days
right? We have to create any, any name of the enumeration days. I have created as enumeration name days
So I have uh these following days we have to return OK
Uh From Sunday to I have returned Saturday. These are the following days I have written
right? Uh enumeration, start with the tag uh starting tag and closing tag over here
After that, I'm going to out work with this program is simply we have
right? Uh write that class, I have created another class. So I have to without wasting a time
So I have already created the class, right? So here I just copy and paste it over here
class employee, right? You can't create any name of the class name
I just create the name of employee. So here I have written the inside the employee class
I have created the meta code which is a print day uh print it
right? So here I have created the uh print the statement like this OK
days, days mean. But uh this is the name of the enumeration days
What's the day you have to select here? I'm going to select us if you click on this one
press dot All the enumeration property will be, you will be able to see all the enumeration property
Here, all the properties are there. If you are execute as a Tuesday
if you are selected Thursday, Tuesday, Tuesday, uh Tuesday will be uh there
right? This is how we program work now here. What I'm going to see now here
I'm going to execute inside this main method of this class, right
So I write here is so I've already this all the stuff I will discuss about our last tutorial
So I have to without wasting our time and I just copy and paste and tell that
So this is the class name. So we have right inside the main method we have called the class name
This is the employee I have create the object, new employee, we have created the uh we have created the keyword of new
created the object. We you mean is the object creation of employee class
right? This is the object creation of employee class. This is a class we have created as an object E right
In this class, you mean in this class here, if you go here put dot what are the properties inside this class
It will be displayed here here, print there, this is the property
So here open Cabra and close paet, this is a matter close
right? So what you are written in this inside this method, it will be printing over here
right? That's how the programming work of enumeration, right? Animation in Shisha in a simple way
you are already animation, right? So you got the animation, animation. We are correct
Shisha. Bye. We have to com OK. Comma single line command say Anum OK
Right now when you execute the program, you you will have to get the output as which
one Tuesday we will be uh we see what the output will be displayed
This uh project is building OK? It built right
now, you can see the output as Tuesday, right? So you have to call it as Tuesday
Now if you change it as a Friday. Now you again, you can execute it
Now, this time, it will be loaded right there at the first time. Only it take some time to load the uh program here
After that, it will be normally it will be load and lo right here. It is very easy stuff to here
Sunday. It will be good, right? The animation is very easy stuff we are doing in.net Co OK
Here, this is very simple stuff too. We have write the animation in Sh sha.net code
Ok? I hope you guys you understood the animation enumeration concept. Well
animation, you can uh put it as a year also, ok? Uh if you want to uh month
ok. If you want to calculate the month January uh from January to December
you can write like this and you can the same thing you can calculate like this
ok? You can do the following stuff. Ok? Thank you for watching. If you have any doubt on this
you can ask me anytime if you like my channel, please subscribe me like me. Thank you for watching
Hi friends. Welcome to tutors Funny Channel today. I'm going to continue the tutorial of.net core part five tutorial
So first I'm going to do the for each loop. So well
let me see how the how uh for each loop will work
OK. So first of what I did here is I already created the console application over here
So this is the main method of the program inside the main method I have created the array
right? This is called a string array. This is the array name
right? So values, so these are the values. So here these are the values
right? Hello. OK. So now I want to display this hello message
So here we have to write the for each lobe. So you have to write I this is a variable I have created in
meaning this is a keyword values. Mean these are the array values
What are all the values should be passing to the values here
OK. The cr A passing to the cr A variables. OK. So this value should be coming here
So if you are right, do right line item, what happen is each time it will be low
First time you sell of print, H print second time, E print third time L fourth time L six times this one should be zero
right here. Array always start with the position of 001234. This how the array works right
Now, let's see the output of the output like this. OK? You can check the output
Hello, it working successfully, right? OK. Now, now let's discuss about the part of inheritance
So how the, how the inheritance works in C# dot net? Let me see
Step based. Now, first, what I'm going to do is here we have to remove these clients
OK? Now I'm going to create the inheritance. So the inheritance work to your right
OK. So first I'm going to create a class. So your class
you create the class name, which is the address, last name, which is address
So address, I'm going to type here. Uh We are right now
Address we have type two here. We have write the, we have write the variables you write
pr O so we have write plus two times that case you can get the properties like this my property
The first property I'm going to write here. This is string that right string house number
right? We get and set the method. So again, I'm going to create another property
So pr op plus tap key on your keyboard two times it will be generated
This is this how we have generated. This is the, the way OK? So the same string
we spring your calculator split like the same thing I just copied and pasted over here
You have changed this one as a shy, right? You get set method
you have set it here. OK? These are the properties you are setting here. After what I'm going to do here is
yeah. All right. The same class I just copied, get the copy another copy. These are the properties we have to be right
So now let's see how the programming work here. OK? Uh Before we have to inherit it
I'm not using any inheritance. Uh inherit any classes here. So here what I am going to do is here
So here you can see here we are in instantiation we have to do here
So we have to do, we have to create a class address
We have to create a variable a equal new address. So I want to get the properties of this class address class
We have to get the uh object address, class, object A dot To get all the properties of it house name
house number, state, all the stuff house number you have to take here 111
right? So here sorry, we are putting the double protection mark. So because this is a string
house number is string so that we have to put right in the double protection mark
Now here we are right how to print this one console dot Bright line
You right there. This is the same thing to see copy, paste this all that we have to show on this one
OK? So before we have to in uh before do the returns part
we have to do the output look like this. OK? Now what I'm going to do is here
I'm going to create another class. So the same class, I'm going to copy and paste it over here
This class, I'm going to create a house address. OK? OK? House address
So house address, I'm going to create only the one thing we are created house name only right now
Now I want to access if you are going going he go here the same thing house address
Ok. You have create the house address over here. House address you area here
Now let let's look at the concept here. A we are grade our address uh class
we are good. Uh We are grade object A. If I put that only you can get only this class
Uh what is the property? You are declared inside the class only you can get
you can't get the this class also or this this all the properties you
you uh you can't get here. So how to, how to get this class values
OK? In this class, OK? That's how the inheritance work, right? So inheritance work
So you have to, if it is a C#, you have to write the colon this
So you have to write the inheritance, right? This is the address class. So this is a parent class
This is a child class. So this is the address I have uh you have to use the inheritance
So if you use the inheritance, what happen is what are the properties you are uh inside this class
All the property will be coming this class as well. So now you will be able to go uh I A that you can get
all the properties out house, name house number street and everything you can get it out that OK
Now imagine I need to create another class, can see to copy and paste it
All right. So now what I'm going to do is here here
Now I'm going to name this class as uh shop address. Ok
Now I want to here only you have a class here, address
class, I have different address. Class, address, class has these methods. So here I'm going to change it honey
Now let's look at the output. Now go here. Now I'm going to get this one as a shop address
the same thing, shop address. This class I have created the object s equal new shop address
OK? Now let's look at the concept of inheritance. So how to call this
These are all the properties I want to call in this class to shop at the store and here this class property
How can I get it? So here only you can get only one class OK? A S dot City house name
shop name street is all are coming from this class and this class property only display
OK? So this class property we we couldn't get here house name it will it available so you can check it is not available also
on this program. So how to declare this class? OK. Here you can't inherit two classes here
If you inherit two classes, it show error in program. If it is a interface
you can hinder it more than one class. If it is an interface, you can hinder it
OK? More than more than one interface you can hinder it but classes you can't in it more than one classes
This is a general rule of the program, right? So how to get this possible how to get this property in inside this class
So it's possible. OK. Law this class, this class cannot see the copy cannot be
So this class property you can get it here. Now what happened? What what they have to do here is this class has a address
property we have in this class. We have inherit already inherit address
So this all the uh address class property reside on this class house class
So again, the shop class also we have to call this address we have in this shop class
we have to in it. Uh the house address, what happened? The shop uh the shop uh uh house address include p address
class all the properties. So and house class property also is included
So if both will be coming here. Now if you take a look at this concept
is that sorry S dot You can check here all in the house name will be there right here
All things are there here city house is coming as a alphabetical order
So city house name, house number, shop number, shop name fit all the properties will be displayed
OK? These are the inheritance right? There are many students have a confused about how in uh one more classes
right? There are many students confusing about this concept. So that I have a
I have explained simple example, right? All the things is work. OK
It, it is a very simple concept. You must understand if you are not understand that this concept
well, you can't write the program. The M BC also be difficult to study
If you study this concept clearly, the program will be easy. So how two or two more classes
Right? OK. OK. That's the thing we have to do, right? Uh I uh I hope you understand this concept
Then if you have any doubt on this, you can ask me anytime. If you like my channel
please subscribe me like me. Thank you for watching