
Introduction to The Course.
Introduction to the chapter to present what we are going to discuss next.
In this important lecture we need to set a solid understanding of the different types of programming languages.
You need to learn another important concept in the world of computer science before you start learn more about programming...which is the compiler.
In this article you will see how compilers actually work in details.
C# is a very powerful programming language and can be used to deliver different types of applications, let us see what can you do with C#.
In this lecture you will be installing the latest edition of Visual Studio which is 2019 Preview For Window.
In this lecture you will be installing the latest edition of Visual Studio which is 2019 Preview For Mac.
Visual Studio 2019 Preview is out there, in this lecture we are going to check it out and create our first .Net Core console app.
Explaining what are variables and what are the common data types (integer, decimal, double, char, string).
How to work with string variables.
How to work with boolean (true or false) variables.
How to convert one type of data to another type in different ways.
How to use comments in different ways.
See how to use var keyword instead of all the data types.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
Dive deeper into integer datatypes, the limits and the sizes and more.
Explaining the difference between the double, float and decimal datatypes.
How to work with DateTime and display it in different formats and even custom formats.
Exercise No 01 - Test your knowledge of DateTime.
Discuses the different error types such as Syntax Error and Run-time Error (Exceptions).
Explaining the different worldwide naming convention and why to use it.
Learn how to take inputs from the user using ReadLine method.
How to do basic arithmetic operations (addition, subtraction, multiplication, division and remainder) .
Exercise No 02 - Test your knowledge of arithmetic operators.
Learn the order in which operations are performed when an expression is evaluated.
Explaining how if and else statements work, to ask if a condition is proven true to apply some function or not.
Explaining how switch statement works, almost acting as an if statement but with a different technique.
How to do comparisons (equal, not equal, greater than, greater than or equal, less than and less than or equal).
Understand how logical operators (and, or and not) work, they typically used with Boolean values.
Combine many logical operators together to perform a real world scenario such as Username or Email and password scenario.
Exercise No 03 - Test your logical thinking with this exercise.
Complete assignments (1,2,3) in the complete C# course using an open-book approach, including date and age calculations, day-of-week logic, and a days-to-colors mapping, with Google and Stack Overflow searches.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
Explaining how TryParse work and why it is safer than the direct Parse and also how to use the out keyword.
By using const keyword we can create variables that does not change over the life of the program.
If you got bored of the look of command prompt let's see how can we change background color, font size and font color.
How to use the powerful functions to manipulate a strings such as Trim, toUpper, toLower and Replace.
Continuing the manipulation of strings we are going to use Substring, remove, Insert, IndexOf and LastIndexOf.
Exercise No 04 - Test your knowledge of string functions.
Consisting of a backslash (\) followed by a letter or by a combination of digits are called "escape sequences." To represent a newline character, single quotation mark and many others.
String Interpolation is the way that placeholders in a string are replaced by the value of a string variable, it was introduced in c# 6.
Learn how to work with for loops, The for loop executes a block of statements repeatedly until the specified condition returns false.
Learn how to work with different looping technique the While and Do while.
Now we are going to see how to place a for loop inside another for loop, this technique called nested loops.
Exercise No 05 - Test your knowledge of loops.
Math class provide us with the common mathematical functions such as Ceiling, floor, round and truncate.
Continue exploring the Math class functions and properties in this lecture we have Max, min, pow, sqrt and PI.
In this lecture we are going to see how to generate random numbers something like dice maybe or any other example.
Arrays can stores a collection of elements of the same type, In this lecture we are going to see how to use arrays.
Explore assignments 4, 5, and 6 in the C# and object-oriented programming course, including an upside-down triangle with nested for loops, random numbers, and a dice roller with yes/no prompts.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
Now it is time to explore the basic concepts of object-oriented programming.
A method is a code block that contains a series of statements. In this lecture we are going to see how to create methods in C#.
Continue our discussion about methods now let's see how can we add parameters and return a value from a method.
Exercise No 06 - Test your knowledge of basic methods.
Learn the difference between pass by reference vs pass by value (ref keyword and out keyword.
Learn the rules for creating methods with the same name.
Exercise No 07 - Test your knowledge of overloaded methods.
A class is a construct that enables you to create your own custom types by grouping together variables of other types, methods and events. A class is like a blueprint.
Constructors have the same name as the class or struct, and they usually initialize the data members of the new object.
In this lecture we are going to see how can we explore the different classes and structs through visual studio.
Explaining how can we use static methods and what is the need to use static methods.
The scope of a variable determines its visibility to the rest of a program.
The first of the four pillars of OOP which enables you to create new classes that reuse, extend, and modify the behavior that is defined in other classes.
Encapsulation is used to prevent or allow access to its members from outside classes using public, private, protected, internal modifiers.
Exercise No 08 - Test your knowledge of inheritance.
Polymorphism is often referred to as the third pillar of OOP, after encapsulation and inheritance, Polymorphism is a Greek word that means "many-shaped".
Applying the concept of abstraction by making classes not associated with any specific instance.
Exercise No 09 - Test your knowledge of object-oriented programming.
#region lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
Sealed modifier prevents other classes from inheriting from it.
Static class cannot be instantiated. You cannot use the new keyword to create instances. you access the members of a static class by using the class name itself.
A type defined within a class or struct is called a nested type.
It is possible to split the definition of a class over two or more source files. Each source file contains a section of the type or method definition, and all parts are combined when the application is compiled.
Namespaces are used to provide a "named space" in which your application resides. They're used especially to provide the C# compiler a context for all the named information in your program, such as variable names.
Struct is a value type that is typically used to encapsulate small groups of related variables, such as the coordinates of a rectangle or the characteristics of an item in an inventory.
In this lecture we are going to see the differences between classes and structs.
The enum keyword is used to declare an enumeration, a distinct type that consists of a set of named constants called the enumerator list.
Exercise No 10
Learn to model a country in C# by building a world-backed country class, using abstract types, namespaces, continents and currencies, and properties for name, capital, currency, and languages.
Implement a country class with constructors and overloaded methods, create instances in a namespace, and manage languages, currencies, and continents to illustrate object-oriented concepts.
The this keyword refers to the current instance of the class.
An interface contains definitions for a group of related functionalities that a class or a struct can implement..
Interfaces are similar to abstract classes, But there is some differences in this lecture we are going to explore them.
An exception is a problem that arises during the execution of a program, In this lecture we are going to see how to handle them.
Exercise No 11 - Test your exception handling skills
Understand the concept of composition.
Understand the concept of aggregation.
Understand the concept of association.
Explore assignments 7 and 8 in the C# course, modeling a movie with multiple languages and countries via arrays and enums, and implementing a German Shepherd.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
The .NET Framework is an application development platform that provides services for building, deploying, and running desktop, web, and mobile applications .
In this lecture we are going to see how to use Visual Studio Debugger to trace variables and get more important while the application is running.
Debug.WriteLine almost work as Console.WriteLine but there is a difference lets discover it.
In this lecture we are going to see the difference between Build, Rebuild and Clean options in the visual studio.
string is an alias for the class String and int is an alias for the class Int32.
Learn how to add documentations and descriptions to your code including (classes, methods and more).
Code snippets are ready-made snippets of code you can quickly insert into your code.
Learn how to create your own custom snippets in visual studio.
How to use StreamWriter to write files.
How to use StreamReader to read files.
Exercise No 12 - Test your working with files skills.
Understand basics of cryptography and the concepts of Encryption and decryption.
Learn how to use DES encryption technique in C#.
Exercise No 13 - Test your cryptography skills.
Let do something fun and and learn how to change colors of the texts displayed in command prompt.
Digit separator character, represented by single underscore ( _ ). This separator can be used within any numeric literal ,to improve readability of numbers.
Default keyword is used to initialize generic types either to null or 0 depending on if it is a reference or value type.
Explore a Caesar cipher assignment that lets you encrypt or decrypt messages with a user-selected shift, display results, handle errors, and review a ready-made snippet in a C# environment.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
In C# we have two types of collections Generic and Non-Generic, Get ready to understand the differences..
ArrayLists implements the IList interface using an array whose size is dynamically increased as required. Arraylists makes working with arrays much much easier.
Represents a collection of key/value pairs that are organized based on the hash code of the key.
Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.
Represents a simple last-in-first-out (LIFO) non-generic collection of objects.
Represents a first-in, first-out (FIFO) non-generic collection of objects.
Manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0)..
Exercise No 14 - Test your knowledge of structs and ArrayLists.
Represents a list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists. we can say that is is corresponding to the non-generic collection ArrayList.
Represents a generic collection of keys and values.
Represents a generic collection of key/value pairs that are sorted by key.
Represents a generic collection of key/value pairs that are sorted on the key. The difference between SortedList and SortedDictionary is the performance.
Represents a variable size last-in-first-out (LIFO) generic collection of instances of the same specified type.
Represents a variable size first-in-first-out (FIFO) generic collection of instances of the same specified type.
Defines a key/value pair that can be set or retrieved.
Represents a collection of associated String keys and String values that can be accessed either with the key or with the index, NameValueCollection can contains duplicate keys while the Dictionary cannot. Dictionary will be much faster.
Exercise No 15 - Test your generic collections skills.
Generic classes encapsulate operations that are not specific to a particular data type, Let's see how can we create our own generic classes.
Exercise No 16 - Test your generic classes skills.
Build a generic movie class with diverse data types, populate a movie list with rate and release date, and validate actors and directors through debugging.
Tuple is a data structure that comprises of an ordered, heterogeneous collection of “n” elements, In this lecture we are going to discuss the older way of creating and using tuples.
How to expand the limit of tuples by placing tuple inside a tuple.
Tuples can be used with methods to return more than one value from a method.
Exercise No 17 - Test your knowledge of Tuples.
Now we are going to see how to use the new value tuples introduced in C# 7, Which is much easier and more powerful.
Learn how to place a value tuple inside another value tuple.
Value tuples can be used with methods to return more than one value from a method.
Exercise No 18 - Test your value tuples skills.
This lecture covers assignments 11–15, including list insertions at indices and moving items, building a movie class with a genre enum and generics, plus modeling players, clubs, countries, and employees.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
Recursive method calls itself so many times until a specific condition happens. Recursive method has parameter(s) and calls itself with new parameter values each time.
Exercise No 19 - Test your recursive methods skills.
Optional arguments allow method parameters to be optional, to be passed or not.
Named arguments enable you to specify an argument for a particular parameter by the parameter's name rather than with the parameter's position in the parameter list.
In a generic type, a type parameters is a placeholder for a specific type that a user specifies when they instantiate a variable of the generic type.
By using the params keyword, you can specify a method parameter that takes a variable number of arguments.
Exercise No 20 - Test your knowledge of params keyword.
Local functions are private methods of a type that are nested in another member. They can only be called from their containing member.
Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type.
Exercise No 21 - Test your extension methods skills.
Stopwatch class provides a set of methods and properties that you can use to accurately measure elapsed time.
A delegate is a type that represents references to methods with a particular parameter list and return type.
How to get information about method and method parameters assigned to a delegate.
Now let see the difference in the performance of delegates and methods.
Exercise No 22 - Test your delegates skills.
A useful property of delegate objects is that multiple objects can be assigned to one delegate instance by using the + operator.
A delegate can define its own type parameters. Code that references the generic delegate can specify the type argument to create a closed constructed type, just like when instantiating a generic class.
An anonymous function is an "inline" statement or expression that can be used wherever a delegate type is expected, Simply we can say that anonymous method is a method without a name.
A lambda expression is an anonymous function that you can use to create delegates or expression tree types.
Learn how to use lambda expressions with a generic list.
Func is a generic delegate. It has zero or more input parameters and one out parameter. The last parameter is considered as an out parameter.
Action is also a generic delegate. An Action type delegate is the same as Func delegate except that the Action delegate doesn't return a value.
Represents the method that defines a set of criteria and determines whether the specified object meets those criteria or not.
In this lecture we will see how to use Func with anonymous method and lambda expression.
In this lecture we will see how to use Action with anonymous method and lambda expression.
Events enable a class or object to notify other classes or objects when something of interest occurs. The class that sends (or raises) the event is called the publisher and the classes that receive (or handle) the event are called subscribers.
Continue our discussion about delegates in this lecture we are going to see a more complex example of events.
Generates an event after a set interval, with an option to generate recurring events.
Expression body definitions let you provide a member's implementation in a very concise, readable form.
Complete assignments 16, 17, and 18, exploring a recursive message and folder traversal to list file names with creation dates, and a string extension to capitalize letters using multicast delegates.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
Nullable types can represent all the values of an underlying type, and an additional null value.
The conditional operator (?:) returns one of two values depending on the value of a Boolean expression.
Exercise No 23 - Test your conditional operator skills.
Used to test for null before performing a member access.
LINQ (Language Integrated Query) is a Microsoft programming model and methodology that essentially adds formal query capabilities into Microsoft .NET-based programming languages. LINQ offers a compact, expressive, and intelligible syntax for manipulating data.
One of the ways to use LINQ queries in the method syntax, In this lecture we are going to see how to use LINQ in method syntax.
Exercise No 24 - Test your LINQ method syntax skills.
Now let's see another way to use LINQ queries which is the query syntax.
Exercise No 25 - Test your knowledge of LINQ query syntax.
LINQ can perform a lot of query function in this lecture we will see how to sort data in many ways.
In this lecture we are going to see how to return a query from a method as a return value.
A TimeSpan object represents a time interval. The TimeSpan structure can also be used to represent the time of day, but only if the time is unrelated to a particular date.
Multithreading is the ability of a CPU or a single core in a multi-core processor to execute multiple processes or threads concurrently.
In this lecture we are going to see how to create multiple threads and assign each of them to perform a specific task.
In this lecture we are going to see how Sleeps, Abort and Join methods work.
Exercise No 26 - Test your multithreading skills.
Exercise No 27 - Test your multithreading skills.
Article on Multithreading
Now let's go ahead create a multithreaded application, which contains different threads performing in harmony to achieve some tasks.
The ParameterizedThreadStart delegate allows us to send parameters to a thread but supports only a single parameter. If we need to send more we can use an array, a list or a tuple.
Deadlock simply is when two or more threads are waiting for each others to finish and none of them making it to completion is called as a deadlock , lock keyword in C# can help in this situation.
Provides a mechanism that synchronizes access to objects.
A synchronization primitive that can also be used for interprocess synchronization.
Limits the number of threads that can access a resource or pool of resources concurrently.
In this lecture we are going to see the what is asynchronous programming and the difference between asynchronous programming and synchronous programming and how both of them really work.
Tasks simply represents an asynchronous operation.
We can pass parameters to tasks in plenty of ways, In this lecture we are going to explore them.
We can also return a value from task, In this lecture we are going to see how to do that.
We have the capability to check the status of a task, Some of the members that are available for us are (Canceled, Created, RanToCompletion, Running and more).
We have the option to cancel a task while it is running using CancellationTokenSource and CancellationToken.
Now we will see how to use method Wait to wait for tasks to Waits for the Task to complete execution.
The Run method allows you to create and execute a task in a single method call and is a simpler alternative to the StartNew method.
The Async and Await keywords are the heart of async programming. By using those two keywords, you can create an asynchronous method almost as easily as you create a synchronous method.
The concurrent collections provides several thread-safe collection classes that should be used in place of the corresponding types in the System.Collections and System.Collections.Generic namespaces whenever multiple threads are accessing the collection concurrently.
Complete four assignments: search a list using link with result counts, translate hello into seven languages, and run concurrent tasks to determine the first finish and maximum value.
Summing up what we have been discussing in this chapter.
Introduction to the chapter to present what we are going to discuss next.
Provides access to the functionality of an installed speech synthesis engine.
Exercise No 28 - Test SpeechSynthesizer skills.
We can use Process.Start method in the System.Diagnostics namespace to start any process like notepad, calculator or even visual studio itself.
Exercise No 29 - Test your knowledge of how to create a process.
Arrays can have more than one dimension. In this lecture we are going to create two dimensional array.
Exercise No 30 - Test your multi-dimensional arrays skills.
Jagged array is different than the multidimensional array, Jagged array is an array whose elements are arrays. So we can say it is an array of arrays.
Exercise No 31 - Test your advanced arrays skills.
Indexers allow instances of a class or struct to be indexed just like arrays.
The dynamic type enables the operations in which it occurs to bypass compile-time type checking. Instead, these operations are resolved at run-time.
In this lecture we are going to explore the differences between var keyword and the dynamic keyword.
The readonly keyword is different from the const keyword. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor.
The using static directive designates a type whose static members you can access without specifying a type name.
The preprocessor directives give instruction to the compiler to preprocess the information before actual compilation starts.
One of the very easy methods to use to indicates whether the specified string is null or an empty.
Destructors are opposite of constructors they are used to destruct instances of classes.
The using statement ensures that Dispose is called even if an exception occurs while you are calling methods on the object.
An assembly is a collection of types and resources that forms a logical unit of functionality. All types in the .NET Framework must exist in assemblies.
Provides information about a specific culture. The information includes the names (English name and native name) for the culture, the writing system, the calendar used, the sort order of strings, and formatting for dates and numbers.
Represents the version number of an assembly, operating system, or the common language run-time. There are four keys to define version (Build, Major, Minor, Revision).
Contains information about the country/region. Unlike the CultureInfo class, the RegionInfo class does not represent user preferences and does not depend on the user's language or culture.
Attributes provide a powerful method of associating metadata, or declarative information, with code (assemblies, types, methods, properties, and so forth).
Custom attributes are essentially traditional classes that derive directly or indirectly from System.Attribute. Just like traditional classes, custom attributes contain methods that store and retrieve data.
If you are using attributes in your code, reflection enables you to access them.
Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.
A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated.
StringBuilder class represents a mutable string of characters with a lot of powerful methods ready to use.
Patterns test that a value is a specific type, There are plenty of ways to work with pattern matching in C#.
A reference return value allows a method to return a reference to an object, rather than a value, back to a caller.
IEnumerable is the base interface for all non-generic collections that can be enumerated.
You use a yield return statement to return each element one at a time.
A DLL (Dynamic Link Library) is a library that contains code and data that can be used by more than one program at the same time.
Decompilation is a type of reverse engineering that does the opposite of what a compiler does.
There is plenty of ways to protect your DLL files. In this lecture we are going to use a third party tool to obfuscate a DLLfile.
Demonstrate dynamic handling of assignments 23 and 24 by transforming a fixed multidimensional array into a flexible display and implementing an array of multidimensional arrays with varying types and offsets.
Summing up what we have been discussing in this chapter.
[Update C# 8]
The next major version of C# is officially released which is C# 8.0. We were expecting it for quite some time, we had the chance to learn all the minor features and enhancements included in C# 7.1, 7.2 and 7.3, and I can say I am quite excited about the new capabilities Microsoft keep adding to C#.
In chapter 11 we will be discussing the new features and enhancements of C# 8 with easy to follow examples to make you understand what each feature is about.
------------
Hello and welcome to The Complete C# and Object-Oriented Programming Course, The one and only course you will need to learn C# and object-oriented programming. This is more like a collection of many courses brought together to help you learn C# and how to use it efficiently. This course is by far the most comprehensive and effective on the market. Here's why:
The course will teach you almost everything you need to know regarding the powerful C# language.
This course start with you from zero experience in programming and starts to level up to the object-oriented programming till you reach the advanced concepts and topics of C# (Asynchronous Programming, LINQ,Generics, Collections, Delegates and more).
It will help you learn any programming languages other than C# later, because the course discusses almost every programming concepts and of course how to implement it in C#.
You will experience more than 200 examples, 30 exercises, 24 assignments and over 150 quiz questions.
You will learn about the new features in C# (7.1 - 7.2 - 7.3 and 8) like Enhanced tuples, out variables, local functions, expression bodied members, pattern matching and other more features.
This course will cover different encryption and decryption methods, plus explaining the theory of cryptography.
You will be very familiar with Visual Studio and many of its features like snippets and how to use them and even create custom snippets.
You will learn about real world staff like naming conventions, the small little differences between data types, terminologies, programming concepts and more.
Understand the advanced concepts such as multithreading, the synchronous and asynchronous programming.
Get familiar with the .Net framework structure and understand is the .Net framework
Learn the history of C# language and differences between each version of C#.
Learn how to work like professionals.
What other students who have taken this course say:
"I enjoyed the course. It's comprehensive and covers most of everything you'd want to know about C# and .NET. There's plenty of exercises and assignments in the course to help reinforce lessons. The course could be improved with the addition of a course project, but the instructor has assured that there will be another course forthcoming that will cover this. I recommend this course for anyone who wants to learn more about C# and the .NET framework."
"I am about 1/4 throught this course, and i have to say its brilliant. I have tried to learn how to program with many different languages using may different courses on udemy and have given up either because the course moved to fast or was to technical for me to understand. However this course is fantastic the material presented is very easy to digest and very informative while still engaging. So far i have learnt about using build in metods such as DateTime methods for my programs, creating and useing classes using inheritance, encapsulation and polymorphism. The course progresses on a nice incline in difficulty to test you on what you have just learnt and it has coding exercises, assignments and also quizes to test yourself with. The instructor is also very friendly and is quick to answer your questions with a good level of detail. I would recommend this course for anyone wanting to learn c# or learn how to program in general using c# as a first language."
"This course clearly covered the topics to understanding the language from a first-steps approach. I highly recommend to anyone who wishes to learn the language and requires a video tutorial with enough exercises. -- Thanks Ahmad"
"I've enrolled in countless other C# courses on UDEMY but always end up either getting bored or end up getting confused. In this course so far, the course has assignments which keep it fun for me, plus it cover all topics clearly to prevent me from getting confused. Thank You."
"The course is comprehensive and well explained, undoubtedly the author knows what he is talking about and is pretty experienced with this kind of topics.Examples were short enough to make obvious what each pattern is all about. Author points out issues in different approaches and provides a solution.Never seen these kind of explanations before...Overall I find this course excellent"
"Great course!! The instructor has comprehensive knowledge about the C# language and is able to present the programming concepts and paradigms in a way that is easily understandable.The presentation is very detailed and concise which is greatly appreciated.I feel ready to implement the knowledge gained"
Students also said that this course was:
Comprehensive Curriculum
Friendly
Direct & To-the-point
Get ready to start a journey of 20+ hours of C#, 20+ hours will make you a C# guru.
So what are you waiting for....let's start!