C# Tutorial for Beginners | Learn C# Programming | Visual Studio | Edureka

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome everyone to yet another tech enthusiastic video from Eddie Raycom I am Ravi and today I'll be handling c-sharp tutorial c-sharp is an all-purpose and robust programming language developed by the microsoft corporation in the year 2000 as a deadly competitor to java it is the most popular and dominating programming language when it comes to both web development as well as desktop application development in this c-sharp tutorial we will learn the following concepts firstly we shall begin with c-sharp basics where I'll introduce you to the sisha programming language along with its features followed by that we shall learn the installation procedure of fuzzy char and then we shall understand the c-sharp program structure followed by that the data types variables operators loops conditional statements strings arrays collections structure and functions soon after that we shall enter the object-oriented programming features of c-sharp where I will explain you about enumeration in c-sharp then the object-oriented programming approach such as the encapsulation abstraction interface polymorphism and inheritance then we shall get into overloading and overriding followed by that we shall understand namespace file operations events genrich's delegates and reflection once we are done with the object-oriented programming paradigms of sisha we shall enter into the advanced c-sharp concepts where I'll explain you about the anonymous functions multi-threading exception handling synchronization and the new features added into the latest version of the C shop once we are done with the advanced programming concepts we shall wind up the session with the interview questions based on c-sharp now without wasting much time let us quickly begin with the basics of c-sharp in the basics the first chapter is history of c-sharp back in the early 90s Java was the leading programming language for web development desktop application development and many other fields Microsoft wanted to come up with the competitor with many advanced features that can leave Java far behind it was in the year 2000 mr. Andres Isles Berg and his Microsoft team came up with the idea of C sharp this initiative was approved by the ISO international standards organization and also the ECMA European computer Manufacturers Association and finally the C shop enters the world of software development now we should also understand the features of a c-sharp language firstly object oriented object oriented programming approach is what makes the C sharp to be the most programmer friendly easy to develop and maintain programming language C sharp is meant to be type safe the meaning of type safe is that the compiler will be given access to only the memory location that has the permission to be executed this feature improves the code safety to an exponential level now the next feature is entered operability this feature of interoperability makes c-sharp capable enough to do everything that is native to C++ in a more efficient way which can outperform C++ itself the next feature is C shafts rich library c-sharp provides access to multiple number of inbuilt libraries that can provide pre-programmed functionalities to decrease the time spent in the development process the next feature is c-sharp is scalable and updatable C chef was designed to be superior amongst the other programming languages hence it is always open to updates and it keeps itself highly scaleable with its new features followed by that c-sharp is considered to be highly component oriented the developers at Microsoft used the component based approach to develop C shop this is the most predominant development methodology to keep c-sharp highly scalable and updated then we have a c-sharp to be a structured language the structured programming approach is preferred during the software development lifecycle as it becomes easy to develop compile and deploy the software compared to other procedural oriented programming approach lastly stay sharp is considered to be highly fast sisha programming happens to be faster in compilation and execution compared to C++ and other programming languages these were the few important features of C shop where this let us move to the next chapter where we learn about the installation procedures to be followed to install C++ in Windows to install C++ the first step would be to download the Microsoft Visual Studio to download Visual Studio just Google Microsoft AVS code download and open the first link that pops up in your screen and here you'll find out different links for different operating systems we have the link for Windows similarly for Linux as well as Mac OS now we need to download a link which is preferred for Windows once after the insta file is downloaded just run it as administrator you can see that it is unpacking now give yes to the permission continue now your file is being downloaded once after all your files are downloaded you can see something like this on your screen here the most important step is that you need to select the dotnet desktop development package once after you select it you just have to press install now you can see that your visual studio is getting installed now you can see that your IDE has been successfully downloaded and it's ready to get launched press launch button to launch your Visual Studio once after your press launch you can see a new dialog box which will ask you for sign in if you have a sign-in account you can sign in else you can just say maybe later now you can see a new dialog box now here you need to select your development setting as c-sharp then select the color theme which you prefer I will prefer dark then you just have to start your Visual Studio so here once after you start your visual studio you have four different options lying on your right side the first one to clone or check out code then open a project or solution after that you have open a local folder where you might have saved your code and finally the create a new project option let's create a new project from here you have multiple options you might want to select the first one then select next now here you can name your project let's name it you rake our project let's name our new project ask at Eureka project once after you name your project select create now you can see that your local system is creating your new project so this is how your first project looks like Visual Studio is asking for a feedback you can either give it now or select not now so this is how your visual studio editor looks like you can see that the visual studio has given you the first basic hello world program and now let's try to execute it so to execute your program you want to select a Eureka project which is the name of your project now your program will be executed you can see that the program is executed and the output has been printed on the terminal now let's continue with our further chapters after the successful installation of c-sharp the next project line in our tutorial for today is the structure of a c-sharp program the basic structure of a c-sharp program has class then followed by that the class name here we have given it as ed Eureka followed by that we have main function then the void data type then the static data type followed by that we have the line of string arguments and then we have the print message now let us understand each one of these segments in a much detailed way firstly the class class can be generally defined as a keyword that is used to define the class in a c-sharp program then ed Eureka Eureka is the name of the class class is often considered as a blueprint that stores the members and methods related to the class followed by that we have the main main is basically the primary method of the whole c-sharp program it acts as the Gateway for the control to enter the program it gets executed before any other method of the program is executed followed by that we have the void this segment of the code is designated to the return data type it can be any data type other than void void here means the method does not have any data getting written from it followed by that we have the static the static keyword which says the data members declared are static and a dedicated memory is been allocated for the members declare followed by that we have the string arguments it resembles that the command-line arguments that we use in our program while we execute a program will basically pass some arguments which will be accepted by the program because of this statement and finally we have system dot console dot for written message so here the system is the namespace the console is that the category outlined inside the namespace the right line is that the static technique of the console category is employed to write a message or the text which is present inside the console now let us move on to the program and see this in a practical way so here this is the class keyword in which we used to declare our class and the name of our class is here as program we can change it to add Eureka as well then we have the static keyword here which declares that the data members which are declared inside this particular class are static then we have void which is the return type of the main class and this particular word is the main which resembles this is the main function of the whole program and inside the main function we have the console which prints our message and that is hello world so this happens to be the basic structure of a c-sharp program where this let us move on to the next part of our tutorial so the next part of a tutorial is based on the data types we use in our c-sharp programming so the basic data types used in ossetia program are value data types followed by that we have the pointer data type and lastly we have the reference data type let us understand about each one of these data types in a much detailed way firstly the value data types the value data types are located in the system dot in value type library and are always ready to be directly accessed and variables can be directly assigned to any particular value the value data types are further classified into two types they are predefined data types and user-defined data types the predefined data types are the ones which we normally use in our day-to-day programming these data types are predefined by the language developers and are kept ready to use by the programmers example int float care short double etc this particular table here is immerse the predefined data types used in a CPR program and the range of memory allocated to each data type followed by that we have the memory size allocated to each data type which we use in our day-to-day programming followed by value data type we have the pointer data type the pointer type is a simple data type its functionality is completely similar to pointers used in C programming they are designed to store the address of another pointer the example is float star PTR now followed by the pointer data types we have reference data type the name is self-explanatory French datatype do not actually store the variables instead they store the reference value to the particular variable in other words they store the address of the actual variable the reference variables are classified into three different types they are of chip type dynamic type and string type now where this let us move on to the next chapter which is based on the variables we use in c-sharp variables are the names located for the memory location and that store certain data given by the user and that data is easily accessible by using the variable name there are basically five different types of variables used in C sharp they are null boolean integer float and decimal followed by this let us understand the rules to be followed to declare variables in C shop they are simple first character should always be an alphabet or an underscore succeeding characters can be either digits or letters then special characters are not allowed except the underscore and the last rule is that they are identifier should not be keywords let us see some examples for valid variables that can be used in c-sharp firstly int a here you can see that the variable name is starting with an alphabet so this happens to be a valid variable then we have int underscore a B this variable is also considered to be valid because it is starting with a special character that s underscore so underscore can be used but not any other special character and lastly we have int a 3 0 here the variable name is starting from an alphabet and it is followed by a number so this is considered to be valid then we can see some examples for invalid variables as well firstly we have int 2 so 2 happens to be a number so no variable name should be starting with the number so this happens to be an invalid variable name followed by that we have int whitespace B so the rule says that no white spaces should be included in between the variable name you can cover that using an underscore but you should never leave that with a white so this is an example for invalid variable now after that we have the last example where Inc long is an invalid variable name because long happens to be a predefined data type or you can also consider this to be a keyword so keywords are not allowed to become the variable name so this is an example for invalid variable names now with this let us move to the next chapter the next chapter is keywords so what are keywords keywords are those variables which are predefined in c-sharp libraries and have their own special meaning for example you have the keywords for if-else mein etc so all these keywords are having their own meaning for example the for keyword is used for the looping conditional statements followed by that you have F else mein etc which come under conditional statements in C sharp and main happens to be the starting point of any program in C sharp now let's move further in keywords so these particular keywords are used in our day-to-day programming in c-sharp and these keywords are violets in c programming there are a set of new keywords which are introduced from sisha they are ASM delete namespace protected throw catch public private and many more now with this let us move to the next chapter which is related to the operators used in c-sharp programming Sonne operator can be defined as a special symbol that explains the computer to perform a particular operation which might be either mathematical or logical upon a set of variables c-sharp includes the variety of operators which are as mentioned below they are automatic operators increment or decrement operators assignment operators relational operators logical operators and lastly the bitwise operators let us understand each one of those in a much better way firstly we have the automatic operators automatic operators are used to perform mathematical calculations such as addition subtraction multiplication division and modulus followed by this we have the increment or decrement operators increment operator is used to increase the value of variable by specific number whereas the decrement operator is used to decrease the value of a variable by specific number then we have the assignment operators assignment operators are used to assign the values for variables in C++ programming language examples for assignment operators are equals two and double equals two another example is int a is equals to 10 where the value 10 is been stored into the variable a using the assignment operator equals 2 now followed by the assignment operators we have the relational operators relational operator is a programming language construct or operator that defines the relationship between two or more entities or variables so the basic examples of relational operators are greater than less than equals 2 and not equals 2 so followed by the relational operators we have the logical operators these operators are used to perform logical operations on the given expressions there are 3 logical operators in c-sharp language they are logical and logical or and logical not followed by the logical operators we have the bitwise operators these operators are used to perform bitwise operations decimal values are converted into binary values which are the sequence of bits and bitwise operators work on these bits so the bitwise operators used in c-sharp language power in bitwise and bitwise or pet wise not bitwise is or left shift operator and right shift operator so followed by the operators let us move to the next chapter which is about loops now let us understand the loops used in c-sharp programming language so firstly what are loops loop control statements in osetia are used to perform looping operations until the given condition is true control comes out of the loop statements once the condition becomes false there are three types of loops in Asia they are do-while while and 4 let's begin with for loop so the for loop can be defined as a precise loop that has initialization condition and lastly the increment or decrement now how exactly for loop works firstly you provide an initialization statement then you have to provide the condition statements based on which your file will be working and finally the increment or decrement operator based on which your condition will be incremented or either decremented now to understand this in a much better way let us go through the flow chart so this particular flow chart resembles the workflow of for loop in c-sharp the control begins at the initialization stage followed by that the control enters the condition here the compiler will check the condition and if the condition is true and the statements inside the for loop will be executed and followed by that the control enters the increment or decrement statements where the initialization variable will be incremented or decremented followed by that the control enters the condition again if the condition is true this loop will be executed once again in case if it is false then the control will exit the for loop so this is how the for loop works now let us execute a basic example to understand this so this particular example is based on for loop so here int I happens to be the initialization variable and this initialization variable is been put under a condition which says I should be less than or equal to 5 and lastly we have the increment operator on the initialization variable I which says I plus plus so I variable will be incremented by 1 value after every successful execution of the for loop now let's execute this example you can see that the program has been successfully executed and here is her output now with this let us move ahead to the next type of loop ends Asia which is in the while loop while loop can be defined as a loop construct which executes itself repeatedly until a boolean expression is true now let us understand this through a flow diagram so this particular flow diagram resembles the while loop working so here the control begins at the condition statement first the condition is checked if the condition is true then the statement inside the while loop will be executed once the statements are executed the control comes backs to the condition again and the condition is checked if it is true the statements will be executed again else the control exits the condition statement now let us execute a basic example to understand the while loop in a better way so this particular example is based on by loop now here the while loop condition is been stated as X should be less than or equal to 10 until the condition is true the value of X should be printed here now let's execute this program you can see that the program has been successfully compiled and the output is generated the values from five to ten are been printed here so this is how the vile OOP works now let's move on to the next type of loop in C shop which is the do-while loop the dowhile loop is completely similar to while loop the only difference is that the condition pops up at the end of the statement now let us check out a flow diagram to understand the functionality you can see that the control begins with a statement so this statement will be executed first without checking the condition after that the control lies up at the condition here the condition will be checked if the condition is true then these particular statements will be executed for one more time in case if the condition is false then the control will exit the condition so here we can see that the statements when we use do-while loop will be executed at least for once without checking the condition so this was the functionality of the two while loop now let's execute an example to understand it in a much better way so this particular example is based on do-while loop now you can see that the condition is been placed at the end of the loop so the condition states that the initialization variable I should be less than or equal to 10 now let's execute this program and see its functionality you can see that the program is successfully executed and the output has been displayed here which happens to be the multiplication table of five now let's move further now in the next chapter we will learn about the control statements used in c-sharp programming language so here what exactly are control statements the control statements enable us to specify the flow of program control they specify the order in which the instructions in a program must be executed the make it possible to make decisions to perform tasks repeatedly or to jump from one section of the code to an other now the following of the control statements used in c-sharp programming language they are if statement if else statement if else if lada then we have the nested F and finally the switch statement let us understand each one of them in a much better way firstly if control statement if statement in c-sharp language is defined as a program in conditional statement that F Pro true performs an operation or displays the information inside the statement block now let us check out a flow diagram to understand the functionality of F control statement so here you can see the control starts at the start block and after that it encounters its if condition block here the control checks the condition if the condition is true then the statements inside the if block will be executed else the statements followed by the if block will be executed so this is how the if control statement works now let's execute a sample program to understand its terminology so this particular program is based on f condition and you can see that here the if condition is specified here the number should be less than five until the condition is true the statement inside the F block should be executed after that the statement which is present outside the F block will be executed now let's execute this program you can see that the program has been successfully compiled and now the output is also generated now let's move on to the next type of control statement which happens to be the F else control statement in C sharp the F pants control statement in C sharp is defined as a programming conditional statement that has to statement blocks over one condition if proved true then the block of statements which are present inside the F block will be executed else the statements which are present inside the else block will be executed now let's see a flowchart to understand it in a much better way you can see that the control begins at start then it encounters a condition if the condition is true then the block of statements which are present inside the if block will be executed and after that the loop will be terminated and the control will jump into the next set of statements followed by the condition in case if the condition happens to be false then the statements inside the else block will be executed and followed by that the control exists the condition block and executes the statement which are followed by the condition block so this is how the if-else control statement works now let's execute a sample program to understand its terminology so this particular program is based on if-else condition statement here you can see that I have provided the if condition here now if this condition is true then the statement present inside the F block will be executed else the statement which is present inside the else block will be executed now let us try to execute this program and see the output so you can see that the program has been executed and the number is given the value twelve so the condition here is number should be less than five which fails so the control enters inside the next s blob of statements and the message is been printed you can see that the message is twelve is greater than or equal to five this statement is always executed now followed by this let's move to the next type of control statement which happens to be the if-else lad the control statement the if-else ladder in c-sharp language is defined as a programming conditional statement that has multiple if as blocks if any condition is true then the control will exit the if-else ladder and execute the next set of statements now let's understand this through a flow chart you can see that the control starts at the start block and followed by that it encounters its first condition if the condition 1 is true then statement1 will be executed and the control will exit the block in case if the condition 1 fails then it encounters a second condition the second condition is executed and in case if it is true then the statements 2 will be printed else it exits the block into the next set of statements which are the condition n in case if the condition is true then the statement n will be executed else it executes the default statement which lies after the elsif ladder block so this is how the elsif ladder works now let's execute a practical example to understand this in a much better way so this particular example is based on if-else ladder and you can see the first if condition is been situated here in case if the condition is true this particular message will be printed and the control will exit in case if it is false then the next set of statements will be executed and similarly in case if the second set of statement is false the third one will be executed if neither of the statements are true then the last else block will be executed so this is how the fs ladder works now let's execute this program you can see that the program has been executed successfully and the message is been printed here now let's move to the next type of conditional statement that happens to be the nested death control statement so the next control statement is nested if control statement the nested F control statement in c-sharp is defined as a programming conditional statement that comprises of another if statement inside the previous if statement let us check out a flow diagram to understand this in a better way you can see that the control begins at the start statement and it encounters the first condition in case the condition is true then it will encounter another condition which is lying inside the outer condition in case if it is false then the control will exit now let us assume that the condition was true now the if block which is lying inside the outside condition will be executed and after the execution it will terminate so this is how the nested if control statement works now let us execute a sample program to understand this in a much better way so this particular example is based on nested F control statement here you can see that I have a first outer if statement present here followed by that we have an inside F condition so this is how the nested F condition loop works now let's try to execute this program and see how does it work you you can see that the program has been successful executed and the output has been generated here so this is how the nested F condition works now followed by this let's move to the next type of condition which happens to be the switch control statement the switch-case in C shop is defined as a programming selection statement that checks for the possible match to the provided condition against the available cases if none of the cases match then the control will execute the default statement now let's check out the flowchart you can see that the control starts from switch expression so switch expression is a block where we provide our condition once after the switch expression is executed the control will enter the cases so inside the cases it will find a match in case case one is match then the statement1 will be executed similarly in case if case two is matched then statements tomb will be executed if any of the cases doesn't match then the control will directly enter the default statements and the default set statements will be executed and the control will terminate the switch statement so this is how the switch control statement works now let's try to execute a program so this is an example for switch control statement now let's try to see the condition so this is the statement where we provide the condition and inside this the control will try to find out a match now let's try to execute this switch control statement you can see that this statement has been executed now the output terminal is asking me to provide an input now let's try to provide an input which is a vocal it found the possible match and the output is mentioned rated now so this is how the switch control statement works so followed by that we should move into our next chapter which deals with strings so string is defined as a one dimensional array of characters terminated by a null character the character array or the string is used to store texts such as words or sentences each character in the array occupies one byte of memory and the last character must always be 0 now there are a set of string functions available in c-sharp out of which the important ones are clone function which returns the reference of the string then we have compare which compares to specific strings followed by that we have string and cat which enjoins two strings and source the result in the first string then we have contains which returns the value of a specified substring and then we have copy two which copies the characters from one position to another then equals that determines the two string objectives have the same value and lastly we have trim which trims the strings now let us execute a sample program to understand strings in a better way so string happens to be completely similar to that of Paris we will deal with arrays in the next chapter so what are we trying here is to store the values which are the string values into this particular character array now the string we want to store is a Eureka C shop tutorial now let's try to execute this program and see the output you can see the program is executed and the output is wind generated edges head you rake up a shop tutorial now let's move into the next chapter who which happens to be the erase so an era is defined as a collection of a similar type of data items stored in a continuous memory location the array is the simplest data structure where each data element can be randomly accessed by using the index number there are three different types of arrays namely one dimensional array two dimensional array and multi-dimensional array now let us understand each one of them in a much detailed way firstly one dimensional array one dimensional array can be defined as an array with single row and multiple number of columns the 1d array can be accessed using their index numbers here I have declared an array with the name mine array and the values it will be storing are integer type and it will be storing five different values now let us see how does it work you can see that my first element is 10 and this element will be stored in the first memory location of an array which is 0 so this is called as the index of an array so we have 5 indices for my array which are 0 1 2 3 & 4 now the element end will be stored in the first location which is 0 now followed by that we have few more elements which are 20 30 40 and 50 which will be stored in a continuous order from 1 to 4 so this is how the arrays are work now let us execute a sample program based on one dimensional arrays so this particular example is based on one dimensional arrays and my array name is a RR now I am trying to store five different elements into my array which are 10 20 30 40 and 50 now let's run this you can see that the code is been successfully executed and the array is been printed here which is 10 20 30 40 and 50 now with this let us move on to the next type of carry which happens to be the two-dimensional array the two-dimensional array can be defined as an array of arrays the 2d array is organized in form of a matrix which can be represented as a collection of rows and columns the elements of an array are accessed using the intersection coordinates now let us see the working of two-dimensional arrays here you can see that I have declared an array with the name array now you can see that the index values are changed the first index is 0 comma 0 which happens to be the row number 0 and column number 0 similarly we have all the other elements with their intersection coordinates now let us try to include elements into my two-dimensional arrays the first element is 10 which will be loaded to the first location which happens to be 0 comma 0 then let us include a few more elements into my two-dimensional array which are 20 30 40 50 60 70 80 90 and lastly hundred you can see that the elements are stored into a dimensional array in a continuous order so this is how the two-dimensional arrays work now let's try to execute a program to understand the terminology in a much better way so this example is based on two-dimensional arrays now you can see that we have two different for loops the outer for loop is dedicated for rows and the inner for loop is dedicated for columns now let's try to execute this program and see the output you can see that the program has been successfully executed and the elements have been added into my array now let's move on to the next type of arrays which are the three-dimensional array or the jacked array the multi dimensional or three dimensional or check array is defined as the array of arrays the 3d array is organized as a 3d matrix which can be represented as the collection of multiple rows and multiple columns the elements in the array are accessed using 3d intersection coordinates now let us try to see an example and understand how does it work so this particular example is based on Jack array now let's try to execute this and see the output so you can see the code has been successfully executed and the elements have been added into my array so this is how the jack array works now let's move ahead and understand collections so what are collections collections can be simply considered as a group of objects collected so as to apply some functions upon the collected data the operations that can possibly perform on a collection are store object a plane object delete an object retrieve an object search for an object and sort the object now moving ahead the types of collections there are three different possibilities to work with collections the three namespaces mentioned are system dot collections dot generate classes system broad collection start classes system dot collection dot concurrent classes so the first type of collection in this list the list is considered as a data structure available in system dot collection dot genrich's namespace it can store and fetch elements the list is capable to store duplicate elements as well now let us try to execute a sample program to understand lists in a mass fit away so this particular example is based on list now here I'll be adding four different names into my list let's run the program and see the output you can see that my four different names are being collected into my list now in the collections the next one is the linked list so what is a linked list linked lists are linear data structures similar to that of arrays but the only difference is that the elements are not saved in a sequential memory location instead they are stored in random addresses and they connected using pointers so we have three different types of linked lists in C sharp they are singly linked lists doubly linked lists and circular linked lists now moving ahead let us understand how does linked lists work imagine that you have to store five elements and in case if you are using array then the compiler will assign five blogs which are stored in a continuous memory location and the size would be fixed and the elements will be stored in your array but in case of linked lists if you had to store the same five elements then the compiler will select a random five blocks from the memory heap and it will assign you the five memory blocks you need it for your data so here you have five different elements 10 20 30 40 and 50 and the compiler has given you five different memory blocks which are the following you can see that each memory block is having one blank space and the other one is having an address so this particular address is a pointer which points to the next upcoming node so similarly all the blocks have their own pointers now let's try to store the elements into our linked list so you can see that the elements have been stored successfully into our memory blocks and there is a small change in the last you can see that the last note is not having any pointer here instead it is storing a null value this indicates the end of the linked list now all this linked lists are interconnected using their pointers in this way so this is how it acts as a continuous memory being uh non continuous memory so once after the linked list get connected so this is how it looks like we have a head we have a tail and the notes in between now that we have understood the terminology of linked lists let us deal with the types of linked lists firstly we have singly linked lists then we have doubly linked lists and finally the circular linked list let's sail with the singly linked list first you can see this this particular node is the head and this one is the tail and between we have the nodes so what exactly is singly linked list is a singly linked list contains two fields firstly the address node and the next node s the data assigned to the present node the singly linked list is capable to traverse only in one single direction now let's try to run a program based on singly linked list so you can see that this particular example is based on singly-linked list don't worry about the code if you want the code at any point of time we can mail you if you provide your valid mail ID to us now let's try to execute this program and see the output you can see that the program has been successful executed and we also traverse the linked list and meanwhile we tried to delete the Elements 11 and 14 from our linked list and after deleting the linked list we again traverse the linked list and the result is been displayed here which are 12 13 and 15 now after this let's move on to the next type of linked list which is the doubly linked list a doubly linked list the nodes contain three different fields namely the address of the previous node the data to be assigned and the address of the upcoming node now let's try to execute an example based on doubly linked list so this particular example is based on doubly linked list now let's execute this and see the output you can see that the doubly linked list is been successfully executed and the output is been displayed here now followed by this let's move on to the next type of linked list which happens to be the circular linked list there is no much difference between the singly linked list and the circular linked list but the only difference that we have is the tail is connected to the head again in case of singly linked list the tail nodes address block was supposed to be replaced by a null character but in case of circular linked lists the address block of the tail node is replaced with the address block of the head node so that's how the head and tail get connected and the linked list performs as a circular linked list let's execute an example based on circular linked list to understand its terminology in a better way so this particular example is based on circular linked list now let's execute this and see the output you can see that the circular link list program is been successfully executed and the output has been displayed here now let's move ahead and understand the next type of collection which happens to be the stack so what is a stack stack is a linear data structure which follows the particular order in which the operations are performed the order may be Li fo which is last in first out or filo which is first in last out let's understand this terminology through an example you can see that I have declared a stack by name my stack which is completely similar to that of an array now let me try to add some elements into my stack so the terminology first-in first-out is if you try to add in an element then the element gets added to the first location which is zero and after that if you add few more elements into the stack that is 2 1 2 3 4 & 5 and your stack is full then if you want to access the first element then you need to pop all the elements above the first element only then you can access the particular element you wanted to access let's check out the example and see how does it work the first element is 10 which will be loaded for the first position 0 similarly let me add few more elements which are 20 30 40 50 now let us assume that I need to access the element 10 then I need to pop 50 40 30 20 and finally I'll be able to access 10 so this is a terminology called first in last out our last in first out so 50 happens to be the last element so this is the first element that will be coming out now let's see how does it work you can see 50 popped out first and then for T similarly 30 20 and finally we have element n which is popped out in the last V so this is how the stack works now let's execute a basic example to understand the terminology of stack in a much better way this particular example is based on stack so the elements that I will be adding into my stack are the names which are provided as below now let's try to execute this program and see how does it work you can see that the elements have been successfully added into my stack and I tried to remove the element Kumar then I have popped coma after popping Kumar from my stack we have rajesh similarly after popping rajesh will be having james we will be having pooja after popping james then finally we'll be having Chandan so this is how Stagg works now let's continue and understand the next type of collection which happens to be the Q a Q is a linear structure which follows the particular order in which the operations are performed the order is first-in first-out this is opposite to stack in stock we had first in last out but in Q we have first in first out let's see how does it work through an example now here completely similar to that of SAC I have declared a new cue with name my Q now I'll be trying to add in elements into the Q so the first element will be stored in the first location 0 followed by that 1 2 3 & 4 let's try to add some elements into my cube the first element n is been successfully added and we had 20 30 40 and 50 so these elements will be stored in continuous memory locations then if you try to access 10 then you can directly remove them from the cube which is first-in first-out but in case if you want to remove 50 then you have to wait for 20 30 40 to be removed so this is how you swore let's see practically let us think or let us assume that we want to access 50 from the queue then we have to remove 10 first followed by that we have to remove 20 then we have to remove 30 later 40 and finally 50 this is how the first-in first-out works or the last in last out who works so the 50 element was the last element to be coming into the queue so similarly this is the last element that is to come out from the queue so this is how queues work now let's execute a sample program to understand queues in a much better way so this example is based on queues and similar to stack I am trying to add names into my cube let's execute this program and see the output you can see that the elements are been successfully added into my queue then the peak element was srujan so sujin is a topmost element and we have DQ dodging after D queuing the peak element we have project at the next week element where this let us move to the next kind of collections which is the hash set so what is a hash set the C shop has set category is often accustomed to store take away or read components it does not store duplicate components now let's try to execute a sample program to understand hash set so this particular example is based on hash set let's run this program you can see that the program has been successfully executed and the elements have been successfully added into the hash set now let's move further and understand what are sorted sets the C shop sorted set is often accustomed to store remove or read elements it maintains ascending order and does not store duplicate elements it's from to use the sorted set category if you have got to store distinctive components and maintain ascending order it's found in system dot collection start generating space now let's execute a sample program to understand sorted sets so this example is based on sorted set now let's execute this you can see that the program has been successful and the elements have been added into the sorted set in ascending order you can see that the names provided were Sanjaya Narada Praveen Ravi and Kajol which are not in an ascending order when you executed the program the name somewhere in ascending order which were Anuradha Kajol Praveen Ravi and Sanjay now let's move ahead and understand next type of collection which happens to be the dictionary dictionary category uses the idea of hash table it stores values on a premised of the key it contains distinctive keys solely by the assistance of the key we will simply search or take the elements away as found in the system broad collection start generating space now let's execute a sample program based on dictionary so this particular example is based on dictionary you have the keys which are 1 2 3 4 & 5 and their respective elements which are Shiva Pritam Roy Akash and many more now let's execute this and see the output you can see that the program has been executed and the elements are stored according to that keys one for Shiva two for Prasad three for Pritam faux-fur Roy and finally Pfeiffer Akash so this is how the dictionaries to work now followed by that the next type of collection is the sorted dictionary so what is a sorted dictionary the sorted dictionary category uses the conception of hash table it stores the value on the idea of the key it contains distinctive keys and maintains ascending order on the idea of the key by the assistance of the key we will simply search or take the elements of e it's found in the system dot collections dot generic namespace now let's execute a sample program to understand sorted dictionary so this particular program is based on sorted dictionary now let's execute this and see the output you can see that the numbers for the keys have been given in a irregular manner now let's see the output after executing you can say that the program has been successful and the elements are sorted in an ascending order so this is how the sorted dictionary works followed by this we have the next type of collection which happens to be the sorted list the sorted list is an array of key value pairs it stores the values on the premise of the key the sorted list category contains distinctive keys and maintains the ascending order on the premise of the key by the assistance of the key we are able to simply search or remove the elements it's found in the system dot collection stored engendering namespace now let's execute a sample program to understand the sorted list so this particular program is based on sorted list now again you can see that the keys are given in a random order let us execute this program and see the output and what are the changes that we can find in the you can see that the program has been successfully executed and the output has arranged all the elements in the ascending order based on their keys now followed by this let's move ahead into our next chapter which happens to be structures so what is a structure a structure is defined as a user-defined data type available in c-sharp that allows to combine the data items of different data types together structures are used to represent a record struct is a keyword used to declare structures the basic example of a structure is been given below which is declared using the keyword struct and the name of the structure happens to be school and inside the school you have ID of in d2 data type then you have the name which is a string data type and finally the percentage which is a float data type so all these keys are belonging to a different data type and they are collected under one structure that is school so this is how structures work to understand structures in a much better way let's execute a sample program so this particular example is based on structures here my structure is books and inside the books I have title author subject and book ID now let's try to execute this program and see how does it work you can see that the program has been successfully executed and the output is been generated here so followed by structures we have functions so what exactly are functions a function is defined as a block of code of the main code the function is used to execute statements specified in the code block a function consists of the following components which are function name written type and body access specifier parameters the function name is used to make the function call then the return type which specifies the data type of the return value and followed by that the body which contains the executable statements then we have the access specifier which specifies the functions accessibility and finally the parameters which are the lists of arguments now let's see an example to understand functions in a much better way so this particular program is a basic example of functions let's execute this and see how does it work you can see that the program has been successfully executed and the data is been displayed here saying inside show function and the message welcome to Ed Eureka now let's execute few more examples based on call-by-value and call-by-name call-by-value we know that the functions execute basically by two means which is called by value and call by reference so this is the first time which is called by value now let's run this program and see the output so you can see that the program has been successfully executed and the output has been generated now and the next type of functions which is called by reference now this type of program is based on call by reference let's execute this and see the output so you can see that the program has been successful executed and the output has been generated don't worry about the ghosts we can send you if you provide us your mail ID in c-sharp we also have another type of function which is out parameter now let's execute a program based on that - you can see that this is the program now let's run this there you go the program has been executed and the output is also been successfully generated now with this we conclude the basic part of our exit shaft tutorial so now we begin with the object-oriented programming in C sharp the object-oriented programming system is a programming paradigm based on the concept of objects that contain data members and methods related to them the primary purpose of object-oriented program is to increase the flexibility and maintainability of programs so now we will discuss some of the features of object-oriented programming it emphasizes more on data rather than procedure the programs are divided into objects thus making it easy to work with data structures are designed in such a way that they characterize the objects functions that work on the data of an object are placed together in the data structure data is hidden and cannot be accessed by external functions without permission communication between objects can take place with the help of functions adding new data and functions has become easy follows the bottom-up approach and programming design so all these features make the object-oriented style of programming the most reliable style of coding so with this let us begin with the first approach of object-oriented programming which is encapsulation so what is encapsulation encapsulation is a procedure to combine the methods along with their data members now let us go through a sample program to understand encapsulation in a much better way now this example is based on encapsulation so the main motto of encapsulation is to combine the methods along with their data members so this one example is based on encapsulation let's execute the code and see the output here you go the code has been successfully executed and the output is been displayed here now let's move to the next part of object-oriented programming which is the abstraction abstraction is a method to hide complex coding part from the user by providing him with only the required information he needs now let us execute a program based on abstraction to understand this in a better way so this particular program is based on abstraction now abstraction is a procedure in which you hide the unnecessary information from the user and help him to get the information only which he is looking for now let us execute this program and understand how does it work you can see that the program has been success fully executed and the related information which the user was looking for is a brand of the laptop and the model name which has been displayed here now after this let's move ahead and understand interface the interface is completely similar to abstraction the functionality of interface is to hide the unimportant data from the user and provide him with the only important data he needs now let us also execute an example based on interface so this particular example is based on interface and we declare an interface using the keyword interface now let us execute this program and see the output you can see that the program has been successfully executed and the output is been displayed now with this let us move ahead into the next part which deals with polymorphism polymorphism is a combination of two words which is poly and morphus which means many forms it is a Greek word it means the code segment can take up multiple forms we have two types of polymorphism namely compile-time polymorphism and runtime polymorphism now let us execute a sample program based on polymorphism now this particular program is based on polymorphism and here we have two functions with the same name that has ADD numbers and add numbers again but the only difference is the first add numbers function has two parameters and the next add numbers function has three parameters now from the main class we are providing the parameters from 1 and 2 and another function call which provides the parameters 1 2 and 3 so the functions will be called based on the number of parameters we are calling with now let's execute this program and see the output the functions are called and the output is meant displayed here where this let us move ahead and understand the next part which is inheritance inheritance is a process in which one object acquires all the properties and behaviors of its parent object automatically you can reuse extant or modify the attributes and behaviors which is defined in other class the class which inherits the members of another class is called derived class and the class whose members are inherited are called as the base class the derived class is the specialized class for the base class now there are varieties of inheritance is available in c-sharp firstly we shall deal with single level inheritance c-sharp single level inheritance is a process where a sub class inherits all the properties and behaviors of a single superclass let us check out an example to understand single level inheritance in a better way so this particular example is based on single level inheritance the first main class or the base class is the user followed by which we have details class which happens to be the subclass now let us execute this program and see how does it work you can see that the program has been successfully executed and the properties of the base class are being inherited into the child class now let's move ahead and understand next type of inheritance which happens to be multi-level inheritance so the multi-level inheritance is a process where a sub class inherits all the properties and behaviors of more than one superclass at multiple levels you can see that this particular class a happens to be the base class followed by that this class happens to be the child class for Class A and finally you have Class C which happens to be the child class for class P so here Class C is inheriting the properties of Class B and Class A let us execute a sample program to understand this in a better way so this particular example is based on multiple inheritance you can see that this particular class a happens to be the base class and followed by that we have the class B which happens to be the child class to class a then finally we have class C so this particular class C is the last child class then here we can see that Class B is inheriting the properties from Class a similarly Class C is inheriting the properties from Class B now let us try to execute this program and see the output so you can see that the program has been successfully executed and the output is fin displayed so followed by this we can move on to the next type of inheritance which is hierarchical inheritance hierarchical inheritance is a process where one or more subclasses inherit all the properties and behaviors of one superclass now let us try to execute a basic program to understand the ire RTL inheritance so this particular example is based on hierarchical inheritance here we have different classes firstly we have the class principal and followed by that we have the class teacher then lastly we have the class student so here the properties are being inherited from principal to teacher then teacher to student now let's execute the program and see the output you can see that the program has been successfully executed and the output has been displayed on the monitor followed by that we also have few more types of inheritance such as multiple inheritance and hybrid inheritance but c-sharp does not support multiple inheritance as well as hybrid inheritance moving ahead we deal with overloading when we create two or more members of a class having same name but different number or type of parameters then it is known as c-sharp overloading in c-sharp we can overload methods constructors and index properties now let us try to execute a basic example to understand overloading in c-sharp so this particular example is based on function overloading in c-sharp we have two different methods here with the name add numbers and add numbers so one of the add numbers method has two parameters and the other add numbers method has three parameters now let us try to execute this program and see the output you can see that the program has been successfully compiled and the output is mention rated here when this let us move to the next chapter where we will deal with overriding when a derived class has a function with same name as a function of the base class then this is called as function overriding both the functions must have the same number of parameters in both the classes let us try to execute a sample program based on function overriding in c-sharp so this particular example is based on function overriding so we have a method called s and get info in the base class as well as another method with the same name which is get info in the derived class and both the functions have 0 number of parameters including in them and they also perform the same operation that is to print a message in the terminal now let us try to execute this program and see the output can see that the program has been successfully executed and the messages are also printed on the screen now with this let us move ahead and understand the differences between overloading and overriding the first difference the scope is same in overloading when it comes to overriding in the scope is different the next difference is in overloading the signatures must differ while on the other hand in overriding signatures must be the same that is the number of parameters followed by that the third difference is in overloading multiple overloading functions is possible in overriding multiple over adding functions is not possible the last difference between the both is overloading can occur without inheritance but on the other hand overriding occurs only because of inheritance with this let us move ahead and understand enumeration in sisha so what is enumeration the enumeration in c-sharp is a user-defined data type it is designed to assign names to integral constants the names increase the readability of the program and also the program becomes easy to maintain now let us see an example based on enumeration and understand that in a much better way so this particular example is based on enumeration you can see that my enumeration name is weak and I've declared this enumeration using the keyword enum so here I am inputting some data into my enum which is Monday Tuesday Wednesday Thursday Friday Saturday and Sunday so these values which I have entered into my enum week will be considered as constants and these values will not be changed you cannot remove any elements from this particular enum but you can try to add in some values into this enum in this particular instance you cannot add more elements into this particular enum as every week has 7 days but in other instances you might add in some new values into your enum but cannot remove the elements now let us try to execute this program and see the output you can see that the program has been successfully executed and the out participant displayed on the screen so according to the program I was supposed to print the position of the constant Friday in the ena so which happens to be zero one two three and four so Friday comes at four and the data is been displayed on the monitor so this is how enum swerg followed by this we shall move ahead and understand namespace so namespace is basically used to handle multiple classes present in the program the namespace is available in different ways system dot console here the system becomes the namespace then to access the class of a namespace we need to use namespace name dot last name and finally we can use the keyword using as well to understand namespaces let us execute a sample program so this particular example is based on namespace and now here we are trying to print two different messages which are welcome to at Eureka and happy learning now let's try to execute this program and see the working you can see that the program has been successfully executed and the output welcome to ed Eureka happy learning has been printed here now let's move ahead and understand file operations in c-sharp the file mode is an enumerator which defines multiple file opening methods the members of the file mode enumerator are described as follows firstly appened it opens an existing file and puts the cursor at the end of the file or creates the file if the file does not exist next create it is designed to create a new file followed by that we have created new it is designed to specify the operating system that it should create a new file after that we have opened it is designed to open an existing file then we have open or create it is designed to specify the operating system that it should open a file if it exists otherwise it should create a new file then truncate truncate opens an existing file and truncates the size to 0 bytes now followed by this we shall understand the file operations in c-sharp the file operations in c-sharp are reading data which is read then writing new data which is right and finally we have read and write with this let us understand file share and numerator the file share and numerator is used to share a particular file it has the following members inheritable inheritable allows a file handler to pass an inheritance to the child process next we have nun nun declines sharing of the current file then we have read read allows opening of a file for reading then we have a read/write read/write elapsed opening of a file for reading and writing and finally we have write which allows to open a file and write now let us continue with events even is generally known as an action that is generated by the user it might be a click from the mouse or even a single keystroke from keyboard similarly c-sharp programs also have events the generator of the event is called as the publisher and the receiver of the event is called as a subscriber let us try to execute a sample program to understand events in a much better way so this particular program is based on events class even block is known as the event block then we have the subscriber which is welcome user now let us try to execute this program and understand the functionality you can see that the program has been successfully executed and the messages are also printed here welcome to at Eureka happy learning with this latest move on to the next chapter which deals with the genrich's so what are generous genrich's is a concept of providing the members and methods of a class with placeholders in runtime we can define genrich's using greater than less than brackets let us check out the following examples firstly let us execute an example based on genrich's in a method so this particular program is based on gender X in a method now let us try to execute this and see the output you can see that the program has been successfully executed and the message was from gender class and the message from gender class is 1 2 3 e followed by this we shall execute an example based on gender X in our class so this particular example is based on genetics in our class now let us try to execute this and see the output you can see that the program has been successfully executed and the message is been printed this message is from Chandra method and the message is three to one H followed by this we shall move into the next chapter which deals with the delegates so what are delegates a delegate acts as a reference to the method basically it is same as the function pointer in C and C++ but far better and typesafe the delegate in static method encapsulated only while the delegate in the instance method encapsulate both method and instance the best user delegate is to use it as an event now let us execute a sample program based on delegates so this particular example is based on delegates let us try to execute this and see the output you can see that the program has been successfully executed and the output is min display now with this let us move on to the next chapter where we can deal with reflection so what exactly is a reflection the reflection is required to obtain the metadata in run time the reference is available in system dot reflection namespace now it requires the following classes to execute they are type member info constructor info method info field info property info type info event info module assembly assembly name and pointer now let us execute few programs based on reflection let us execute the first type in reflection which is the gate type so this particular example is based on get type here I provided the variable a which stores the value 10 then we are trying to get the type of a and we'll be printing the output now let's execute this program and see the output the system has provided the type as int32 now with this let us move ahead and execute the next type of example which is get assembly now this particular example is based on get assembly where we have provided type T is equals to type of system dot string now we'll get the gate assembly of this particular example let's execute this you can see that the program has been executed and the type is private now let's move to the next type and execute an example based on print type information so this particular example is based on print type so here we are providing different types which is full name based name is class is enum is interface so once after we execute this program we will be provided with the type of the function we are dealing with let's execute this program and see the output you can see that the program has been executed successfully and we are provided with the types that we were using in our program now with this let us execute another example based on print instructors so this particular program is based on print Constructors so in this particular program we'll be using a constructor and once after we execute this program the system will provide us with the constructor that we are using in this particular program let's execute this and see the output so you can see that the program has been successfully compiled and the Constructors which we are using in our particular program have been printed here however this let us move ahead so this particular program is based on print methods so we have certain methods in our program so once we execute this program will come to know which are the methods that we have included in our program let's execute this and see the output so you can see that the program has been successfully compiled and these are the methods that we can use in our program now with this let us move to another example where we'll be using the print fields function so this particular program is based on brain phase let us execute this and move ahead you can see that the program has been successfully compiled and the fields are been printed here so the field is system dot string which happens to be empty so with this we conclude the object-oriented programming of c-sharp now we shall get into the advanced concepts of a c-sharp we shall begin with anonymous functions so what is an anonymous function the function that lacks a specific name is called as an anonymous function there are two types of anonymous functions available in c-sharp they are lambda expressions and anonymous methods now let us execute a basic example based on anonymous functions so this particular example is based on anonymous function now which Lexi you this and see the output you can see that the program has been executed successfully and the output of this Square area has been printed here followed by this we shall execute another example based on anonymous method so this particular example is based on anonymous method so this function happens to be the anonymous function now let's execute the program you can see that the program has been executed successfully and the output has been displayed the message inside the anonymous function was this is an anonymous function now moving ahead we shall understand multi-threading so what exactly is multi-threading multi-threading is a process where multiple threads are created and assigned for different tasks this saves time by executing multiple jobs at a single time the multi-threading class is available in system dot threading namespace each thread has a life cycle the life cycle of a thread is defined in the system dot threading dot thread class the following are the stages in a life cycle of any thread they are and started runner will which is ready to run then we have running and then we have not runnable and finally dead let us see some properties of threads along with their descriptions firstly we have current thread returns the instant of the currently executing thread then we have East alive which checks whether the current thread is alive or not then we have east background which is used to get or set the value of the current thread which is in the background or not and we have managed thread ID it is used to get the unique ID from currently managed thread followed by that we have name name is used to get or set the name of the current thread then we have priority which is used to get offset the priority of the current thread then we have thread state which is used to return the value of representing the thread state followed by this we should look into the thread methods along with their descriptions we have a bot method which is used to terminate the thread it raises thread about exception then we have interrupt method which is used to interrupt a thread which is in weight slave join state we have joined which is used to block all the calling threats until district terminates we have preset abort which is used to cancel the about request for the current threat then we have a resume method this is used to resume the suspended trade it is obsolete sleep int32 it is used to suspend the current thread for specified milliseconds then we have start which changes the current state of the threat to runnable then we have a suspend which suspends the current thread if it is not suspended it is obsolete then finally we have yield method it is used to eat the execution of the current thread to another thread we shall execute a real simple example based on multi-threading so this particular program is based on multi-threading now let us execute this and see the output so here thread t is the thread that we are using in our multi-threading program and the name of a thread will be main thread now let us execute this you can see that the program has been successfully executed and the thread name is been printed here which was main thread so followed by this visual advance into the next topic which is exception handling so what exactly is exception handling exception handling is a phase which deals with handling the errors and exception that arise in runtime due to the mistakes in code or invalid inputs entered by the user in c-sharp we have four keywords in exception handling they are try catch finally and through now let us execute a simple example based on exception handling so this example is based on exception handling where we have a try block as well as a catch block in case the try block fails then we have the cache block which will execute the statements which are present inside that now let us execute and see this program's output you can see that the program has been successfully executed and the exception has been printed here which is none other than the divide by zero exception where we attempted to divide the element by zero now followed by this we shall move ahead and understand different exceptions and their descriptions in c-sharp firstly we have system dot divided by 0 exception which is the error generated by dividing with the number 0 then we have system dot null reference exception which handles the error generated by referencing the null object then we have system dot invalid cast exception which handles the error is generated by invalid typecasting and we have system dot input/output dot IO exception which handles the input-output errors finally we have system dot field axis exception this is the error which is generated by invalid private or protected access now we shall understand the system exception constructors the system exception constructor which is used to initialize the new instance of a system exception class then we have system exception serialization info streaming context which is used to initialize a new instance of the system exception class with serialized data then we have the system exception string it is used to initialize a new instance of system exception class with a specified error message then we have a system exception string inception which is used to initialize a new instance of the system exception class with a specified error message and a reference to the inner exception that is the cause of this exception now moving ahead we shall understand system exception properties the first property is data it is used to get a collection of key value pairs that provide additional user-defined information about the exception then we have help link which is used to get or set link to the help file associated with this exception then we have H result which is used to get the set of H result a coded numerical value that is assigned to a specific exception then we have inner exception it is used to get the exception in sense that caused the current exception we have message which is used to get a message that describes the current exception followed by that we have source which is used to get or set the name of the application that causes the error followed by source we have start trace which is used to get a string representation of the immediate frames on the call stack and finally we have target site which is used to get the method that throws the current exception now we shall move ahead and understand system exception methods so the first method is equal object-- which is used to check the specified object is equal to the current object or not then we have finalized it is used to free resources and perform cleanup operations followed by that we have get based exception which is used to get a root exception then we have get hash code which is used to get the hash code followed by that we have get object data serialization info streaming context which is used to get the object data followed by that we have get type gate type is used to get the runtime type of the current instance followed by that we have member wise clone it is used to create a shallow copy of the current object and finally we have two string which is used to create and written a string representation of the current exception with this we shall execute few more examples based on exceptions firstly we shall create a customized exception then we shall try to print the message so this particular example is based on customized exception handling now we shall execute the example and understand how the exception works so the exception here is the H should be more than 18 if the H is less than 18 then the message should be displayed which says sorry H is expected to be greater than 18 now let us execute the program and see how does it work you can see that the H I've provided in my program is less than 18 so the exception is been printed as invalid each exception sorry H is expected to be greater than 18 so this is how the customized exception works followed by this initial execute few more examples based on exception here we shall use finally block basically we have a try block along with that we will be having a cache block in case if try and catch both fail then we have a finally plot which will be executed in the default case here you can see that the program has been successfully executed and the exception is been printed here which says divide by zero exception now we shall move ahead and execute the last example based on exceptions which is based on system exceptions so this particular program is based on system exception now which try to execute this and see the exception thrown by the system so here you can see the program has been successfully executed and the out participant display the system exception is index out of range exception so with this let us advance to the next topic in our tutorial for today which is synchronization so what exactly is synchronization synchronization may be a technique that enables one thread to access one resource for a specific time no alternative thread will interrupt until the appointed thread finishes the task let is execute a basic program based on synchronization to understand synchronization in a much better way firstly let us see the functionality of a program without including the synchronization so in this particular example we will be executing the program without including the synchronization process let us run the program and see the output you can see that both the threats are working together and the data is being displayed two times now let us try to execute the same example by including synchronization this time so this particular program is based on synchronization where we have included synchronization on the same program now let's try to run this now you can see that the first thread will finish the process after that the next thread will be starting so here the system waits for the first train to complete its process until and unless the second trend will not be started so this is how we use synchronization in our real-time programming now with this let us move ahead and understand the new features that are included in c-sharp firstly let us discuss the features network in the C shop 6.0 so the C sharp 6.0 had using static directive exception filters a weight in cash and finally blocks order property initializes default value forget our only properties expression bodied members null propagator string interpolation name of operator dictionary initializer compiler as a service which is rosslyn then we have a few more updates in c-sharp 7.0 which are pattern matching tuples deconstruction local functions digital separator binary literals reference returns and locals expression body constructors and finalizes expression bodied getters and setters out variables generalized async return types followed by that the latest upgrades in c-sharp 7.1 are async main default expressions so moving ahead we shall wind up this session with interview equations based on C sharp so the important and most frequently asked interview questions based on C sharp will be found in this particular article that is the top 50 interview questions you need to know based on C sharp which is this particular article so here you can find the interview questions based on three categories which are beginner level intermediate level and advanced level hope you go through this article and get to know some most important and frequently asked questions based on C sharp so with this we shall wind up this session I hope you have understood the C sharp and if you have any queries related of this session or you need any quotes to the program examples that we have executed in this particular tutorial you can write to us in the comment section below and we will respond to you as soon as possible till then thank you and happy learning I hope you have enjoyed listening to this video please be kind enough to like it and you can comment any of your doubts and queries and we will reply them at the earliest do look out for more videos in our playlist and subscribe to any Rekha channel to learn more happy learning
Info
Channel: edureka!
Views: 120,063
Rating: undefined out of 5
Keywords: yt:cc=on, c# language, learn c# language, c# language demo, c# language tutorial videos, c# language overview, introduction to c# language, c# programming, c# tutorial, c# tutorial for beginners, c# language tutorial, features of c# language, what is c# language, need for c#, basic#s of c# language, edureka, c# projects, learn c# for beginners, learn c# beginner to advanced, csharp tutorial, c sharp, csharp tutorial for beginners, edureka c sharp
Id: wLg-XdAmrak
Channel Id: undefined
Length: 91min 5sec (5465 seconds)
Published: Thu Nov 21 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.