Udemy_Learn_Ccharp_With_Microsoft_Visual_Studio_Community

در این آموزش تصویری برنامه نویسی به زبان سی شارپ را با استفاده از Microsoft Visual Studio Community فرامیگیرید.

این دوره آموزشی محصول موسسه Udemy می باشد.

سرفصل های دوره:

  • پیکربندی Visual Studio
  • دانلود و نصب Visual Studio
  • آموزش اصول Visual Studio
  • مبانی Visual Studio
  • قالب بندی رشته های خروجی
  • ایجاد متغیر
  • کار با انواع داده
  • تعریف متغیرهای چندگانه
  • تعامل با کاربران را از طریق خط فرمان
  • استفاده از داده های ثابت
  • تبدیل انواع داده
  • کار با حلقه ها
  • کار با دستور Switch
  • کار با اپراتورها
  • کار با آرایه ها
  • مبانی آرایه
  • پرکردن حلقه از طریق آرایه
  • کار با متغیرهای مرجع
  • کار با آرایه های چند بعدی
  • انواع داده های پویا
  • آموزش برنامه نویسی شی گرا
  • ایجاد کلاس ساده
  • وراثت
  • و…

عنوان دوره: Udemy Learn C# With Microsoft Visual Studio Community
نویسنده: Tom Owsiak

توضیحات:

C# and Visual Studio are two easily marketed skills.
Reasons To Join Today:
1) This is by far the most comprehensive C# course you'll find here, or anywhere else.
2) I teach in a very detailed and deliberate way. Be sure this style of learning agrees with you.
3) This course uses a feature of Visual Studio called "step into". This unique way of teaching ensures that you truly understand the code. This means you'll enjoy the experience of learning much more, and each minute of content watched translates into much greater comprehension. Why learn this way? Because you'll see what it means to truly understand, and that is something very rare and precious.
4) This course focuses on the language, and not the graphical aspects of windows programming.
5) Each lecture gives you an HD video, a color PDF of all the code, one or more programming assignments, and a "Why this matters". There are about 55 videos solutions. So, in all, you get about 150 videos so far. Watch the solution videos because they cover new approaches, or new material. Some of the exercises require the synthesis of numerous concepts. If you watch the actual solutions, you're getting close to 20 hours of video.
6) You also get several hundred quiz questions of the True/False and Multiple Choice variety. These are designed to test retention of basic facts.
7) After you've completed the course, look into the Microsoft Certified Developer certification. This is course #70-483. You'll have to do more work to prepare for the exam, but it's something very valuable.
Category: Development / Programming Languages
 What are the requirements?
Ability to download and install Visual Studio Community
 What am I going to get from this course?
Over 99 lectures and 11.5 hours of content!
Find, Download and Install Visual Studio Community
Create and Run Simple Console Applications
Declare and Set Variables
Learn How To Use The Visual Studio Debugger
Learn How To Control Program Execute With The "Step Into" Feature of VS
Learn How To Perform Arithmetic
Learn How To Use Various Variable Types
Learn How To Code Forloops
Learn How To Code While Loops
Learn How To Construct Classes
Learn How To Create Both Traditional and More Modern Functions
Learn How To Use and Code Arrays For Various Data Types
Learn How To Convert Between Different Data Types
Learn How To Implement A Simple Inheritance Structure
Learn How to Nest and Call Methods
Learn Simple File Writing and Reading
Learn How To Deploy Applications To Computers
Learn How To Create and Use Generic Classes and Interfaces
Learn How To Work With Lambda Expressions
Learn How To Work With SQL Server
Learn How To Use Linq With SQL, XML and Strings
Learn How To Make Simple Graphical User Interfaces and Display Files and Folders
Learn How To Add Threading To Programs
Learn How To Work With Windows Forms
Learn How To Build A Complete Text Editor with Saving, Printing, Previewing and Opening Dialogs
 What is the target audience?
This is a course for aspiring programmers
This is not a course for experienced programmers

SECTION 1:
Introduction: Find, Download and Configure Visual Studio
1
Find, Download and Install Visual Studio Community
01:22
Why this matters: This is an incredibly powerful programming environment. It's widely used, and is an essential tool if you're going to work in the world of Microsoft. Put this on your resume as a skill.
Learning Results
1) Understand how to find, download, and install Visual Studio Community
2
Configure the Layout and Font Sizes
07:17
Why this matters: Configuring layouts matters because it allows you to customize your work space, so that you can become as productive as possible. And it's your setup, so it feels like home.
Learning Results
1) Understand how to configure font sizes in the text editor
2) Understand how to configure font sizes in the user interface
Assignments:
1) Produce several different layouts of panels in VS
2) Can you move just one tab from a group of tabs?
3) Can you move a whole group of tabs and place them all at once in another location?
4) What is the difference between docked, and dock as tabbed document?
SECTION 2:
Learning the Fundamentals
3
Create and Run Your First Program
07:07
Why this matters: When first learning, simple console applications are a good place to start because you can focus on the syntax of a language.
Learning Results
1) Launch Visual Studio
2) Create and run a simple console application
3) Understand how to launch with Console.Read()
4) Understand how to launch without Console.Read()
5) Become familiar with the concept of a namespace, function and class
6) Understand how to expand and collapse code
7) Understand how to add comments using //
Assignments:
1) Create a program that prints two sentences.
2) Be sure to add comments to your programs
4
Visual Studio Basics
10 questions
5
What's a Statement, A Block, and A Comment
07:29
Why this matters: Understanding statements, blocks and comments is important because complex programs are built from simple pieces. If you understand the simple pieces, you'll definitely be able to build more complex programs with greater confidence.
Learning Results
1) Understand how to write a single line comment
2) Understand how to write multi-line comments
3) Understand how to comment and un-comment using the user interface
4) Understand the concept of a statement
5) Understand the concept of a block of code
Assignments:
1) Make sure you can recreate the code in the video
2) Create a new program with two separate multi-line comments
3) Create a new program with several different blocks of code inside Main, making each block print a message. Nest the blocks, and make each message tell which block it's coming from. Be sure to run this with the debugger so you can see how the code executes across the curly braces.
4) Create a new program with several different blocks of code, and step through it with the debugger, varying the position of a breakpoint and observing the execution of the program
5) Create a program, removing all "using" statements from the top, including System. Write a program that nevertheless prints to the screen with Console.WriteLine() (Hint: Prepend the correct word to Console.WriteLine() to make it work)
6
What's a Statement, A Block, and A Comment
3 questions
7
Formatting Output Strings
10:31
Why this matters: Formatting results is important, for example, in financial applications, where people expect to see currency symbols.
Learning Results
1) Understand how to insert values like 5 into a string output
2) Understand how to format output using several different formats
Assignments:
1) Write code that prints a money value on the screen. Vary the number of decimal places printed with the currency symbol (Hint: Look at what's in the lecture for currency, and compare against the others. Try to imitate the others to get control over the decimal places with currency)
8
Formatting Output Strings
4 questions
9
Create One Variable, and Watch It Change
10:07
Why this matters: Virtually everything in the world is in a state of change, so variables are important. In software, for example, the numbers of characters stored in this box is different from lecture to lecture. Also imagine software that counts likes for a page. The number of likes changes over time. That's a variable quantity.
Learning Results
1) Understand how to declare variables
2) Understand how to set variables
3) Understand that variables are given default values, as shown in the locals window
4) Understand that data types have maximum and minimum values
5) Understand how the "+" symbol can be given a new meaning so strings and numbers can be meaningfully combined
Assignments:
1) Create a program, but this time type "double" as the data type. Set your variable equal to 4.567. Run your variable through a cycle, changing and observing the values.
2) Find the maximum and minimum values that the double data type can represent. Do this in code. You can imitate the video.
3) Be sure you note the default value assigned to double types. Check this in the locals window.
10
Basics of Variables
7 questions
11
Data Type Basics
10:32
Why this matters: The world is made of many different kinds of objects, so different data types are needed. The data type you use can have an impact on the performance of your application. Why waste space using a huge data type when a small one will do, for example.
Learning Results
1) Understand how to declare variables of different data types
2) Understand how to set variable values
3) Understand why different data types are needed
Assignments:
1) Write a program that uses variables to describe some object around you. For example, look at a chair, and describe the chair using variables. Focus on the "properties" of the chair, such as its color, height, whether it's a chair or a stool, whether it swivels, or has an adjustable height. As you construct a representation of this object, think about the kinds of properties it has, and the data type that should be used to represent these properties. Here are some common types.
Integer, boolean (stores true or false values), string, character, double, decimal
Be sure to print the variable values developed in 1) above. You're learning how to decide on which variable type is right for a given situation to describe objects in the real world.
2) Write a program that uses variables to represent a person. Be sure to think of several properties of a person, and then introduce appropriately typed variables to capture those properties. For example, hair color, eye color, height, weight, salary, smoker or not, drinker or not, number of kids, and so on. Once you have these properties and you set them with values, print to the screen.
3) Write a program to display the minimum and maximum values of the following data types:
ushort, short, ulong, long, uint, float, decimal
4) In the context of exercise 3) above, what does the "u" imply when it's attached to a type?
12
Data Types
5 questions
13
Create A Template, Define Two Variables, and Perform Arithmetic
12:29
Why this matters: Having a template makes you more productive. Variables are much more useful when you can operate on them. For example, imagine something as simple as a calculator, or an application used on Wall Street that shows how stock values change over time, or tracks salaries.
Learning Results
1) Understand how to create an exportable template in Visual Studio
2) Understand how to define and use different variables
3) Understand how to perform basic arithmetic
4) Understand how to construct strings using the "+" symbol
Assignments:
1) Create, export, and use another template, this time one with Console.Read(), and a header made with comments. For example, title and name of programmer, and date of program creation.
Create an application that increases a variable by each of the following amounts:
2) Salary increased by 10%
3) Salary increased by 10%, and then decreased by 100%
Hint: A general principle in mathematics is that a quantity can be increased or decreased by writing
New Amount=Quantity*(Percent As Decimal)
14
Operating On Multiple Variables
3 questions
15
Differentiate Between Division of Int, Double and Ulong
07:49
Why this matters: It's important to understand how a single symbol like "/" can produce different results when it operates on different data types. Knowing that this is possible can help avoid unintended results.
Learning Results
1) Understand how to perform division on integers
2) Understand how to perform division on doubles
3) Understand how to perform division on unsigned long
Assignments:
1) Look up three other numeric data types, and recreate this program, observing the results that the division symbol produces when operating on these.
2) Make a table, classifying data type behavior by this symbol. Refer to the table of types on MSDN. MSDN is the Microsoft Developer Network. I've put a link here.
3) Write a program that defines two different salaries. Increase each salary by 10%, and 5% respectively. Form the ratio of the increased salaries to compare them, and display this ratio as a percent. Be sure to use multiple place holders in a single line along the way. In other words, you should have {0} and {1} embedded in a single line.
16
Data Types and Division
6 questions
17
Simple Data Types and The Results of Copying Them
06:13
Why this matters: It's important to understand that simple data types like integers, and doubles, among others, copy by value. This means that the data is copied from one memory location to another memory location.
Learning Results
1) Understand how to copy value type variables
2) Understand that value type variables store their values directly
3) Understand that once a value type variable is changed, for the change to become visible in a copy, the copy has to be explicitly updated
Assignments:
1) Recreate the application in the video, changing the data types from int to double, decimal, ulong, long and so on.
2) Write a program that copies a variable value into several different variables. Set the copies to new values. Print the copies and the original. Has the value of the original been changed by changing any of the copies?
18
Simple Data Types and Copying
5 questions
19
Interacting With Users Through The Command Prompt
07:56
Why this matters: Accepting and processing input, and producing output, are the essential functions of computers and most programs.
Learning Results
1) Understand how to read strings from the command prompt
2) Understand how to add strings together using the + symbol
3) Understand how to convert strings too upper case using ToUpper()
4) Understand how several lines of code can be replaced with a single line of compact code
Assignments:
1) Write a program that accepts three user defined strings
2) Concatenate the string into one string
3) Display the final string as all lower case (Hint: use ToLower())
20
Interacting With Users Through The Command Prompt
4 questions
21
Setting and Using Constants
07:13
Why this matters: Constants are used when quantities don't change. For example, the number of hours in a day, or the number of months in a year. These are good candidates for constants. If a quantity is unlikely to change, set it to be constant.
Learning Results
1) Understand the purpose of the keyword const
2) Understand that trying to change a variable after it's described as const results in an error
Assignments:
1) Make a program that creates two constant variables. Add these two constant variables, and try to assign the value to a regular variable. Will this work?
2) Make a program, declaring and setting a constant. Print the value of the constant, and then try to change the value by reading a new value into it from the command prompt. Does this work?
3) Write a simple program that accepts the length of a side of a square. Have the program calculate the perimeter of the square, and return this value to the user. Would it make sense to have the number of sides of a square declared constant? Repeat this process for an equilateral triangle.
22
Setting and Using Constants
4 questions
23
Conversion of Data Types
07:57
Why this matters: Imagine a financial application. If you try to save a huge value into a data type that doesn't fit it, losses can occur. Sometimes input of one type has to be converted into another form before it can be used in a desired way.
Learning Results
1) Understand how to perform implicit conversions
2) Understand how to perform explicit conversions
3) Understand what the word cast indicates the context of conversions
Assignments:
1) Write a program that sets an integer type to only 2000. Try to copy this value of the integer into a short. Will this work? Try assigning the value 2000 to a short type directly. Does this work?
2) Can a cast be applied to an operation. For example, can you write (int)(x1+x2+x3)? Write a program to check this.
3) Are the following necessarily equivalent? Write a program to check this. Choose several types as the types of x1,x2 and x3.
Compare (int)x1+(int)x2+(int)x3 and (int)(x1+x2+x3). In this context, x1, x2 and x3 are variables.
24
Conversion of Data Types
4 questions
25
Make, Install and Launch A Simple App.
07:18
Why this matters: This is an important step because real desktop applications have to be installed on computers. This lecture shows you the basics of this process.
Learning Results
1) Understand how to code an application
2) Understand how to use ReadKey() to close an app
3) Understand how to publish, install and use the application
4) Understand how to uninstall an application
5) Please be sure to watch the supplementary video on basic methods (also called functions)
Assignment:
1) Create a fully functioning console calculator. This app should be able to add, subtract, divide, multiply, and increase or decrease each value by a specified percent. The user should input two values, and have the results of each operation shown. Make sure the application stays open until some key is pressed. Publish, install and run the application from your system.
SECTION 3:
Making Decisions
26
Simple If/Else Blocks
07:22
Why this matters: Decision making is a huge aspect of programming in general. For example, imagine a table that has a lot of information. Simple if/else constructs can be used to split the table into smaller tables for easier and faster processing.
Learning Results
1) Understand how to convert input to character form
2) Understand how to construct an if/else block
3) Understand how to execute the block using the debugger
4) Understand the connection between characters and integers
5) Understand how the "==" operator is used to check for equality
Assignment:
1) Take the code from the lesson and make it more flexible by adding options to multiply, add, or subtract. Display a single prompt to the user telling her she can input one of four values. Then code a series of if blocks to decide which value has been entered. You can go with one else at the end only.
2) Write a program that will display a price after it's been increased or decreased by a certain amount. The user should specify the rate of change, and whether it's an increase or a decrease. Incorporate a if/else block for decision making, have the user Input I for increase or D for decrease, and have the user input the price. Be sure the result is currency formatted, and the variables are of type decimal.
27
Simple If/Else Blocks
4 questions
28
While Loops
11:38
Why this matters: The while loop is a fundamental construct. This construct allows us to keep running code while a condition holds. This can be used to generate large quantities of random data, or to operate on strings, as shown in the video. This construct has many other uses, such as reading information from tables into code for processing.
Learning Outcomes:
1) Code a simple while loop
2) Step through the while loop line by line
3) Use the locals window to study the values of counter variable
4) Understand how to add 1 to a variable by using the the syntax "x++"
5) Understand how to subtract 1 from a variable using the "x--" syntax
6) Understand how to use the Substring function
Assignments:
1) Take the code from this lesson, and add one while loop to generate a user specified number of triangular patterns.
2) You're going to nest two while loops. Type the code below into your editor, and run it with the debugger, observing the values of the variables very carefully. Do you understand what it means to fix one value while another value varies? Right click on the picture, and choose open in new tab to see a larger version of the picture. That's how you can view a larger version in Chrome.
29
While Loops Used To Keep Asking For Input
09:04
Why this matters: Being able to ask for user input repeatedly makes software much more functional. Here, you see how the word "true" can be used to keep a loop running forever, so that users are polled for new entries forever.
Learning Results
1) Understand how to code a for loop with no counter variable
2) Understand how to use create input "polling"
3) Understand how to take a string, and return a "properly" cased version
Assignments:
1) Using the code in the lesson as a logical template, code a calculator that will repeatedly allow users to enter new values and return the sum, difference, product, or ratio, as specified by the user.
Rough algorithm to implemented:
1. Ask for input one
2. Ask for input two
3) Ask for operation to be implemented
4) Return result of operation
5) Refer to the attached file for code to get you started.
30
While Loops
8 questions
31
Multiple If/Else Blocks
07:48
Why this matters: This construct allows us to check multiple possibilities, so that we have a more flexible program that can operate on several inputs. Realistic code must many times deal with a large number of cases, so our code is just an introduction to what's possible.
Learning Results
1) Understand how to construct an if/else if/else sequence
2) Understand how to embed if/else constructs in an else block
3) Understand why such constructs are needed
Assignments:
1) Write a program that accepts two values, displays several choices for mathematical operations, and then uses an if/elseif/.../else construct to provide feedback to the user.
32
If/ElseIF/Else Constructs
3 questions
33
Simple For Loops To Repeat Blocks of Code
08:59
Why this matters: Like the while loop, the for loop can be used to repeat blocks of code for easy and fast processing. This loop can be used to work with arrays to fill and read them. It can also be used with strings to operate on them quickly, as shown in the video.
Learning Results
1) Understand how to code a for loop
2) Understand how a for loop executes using the debugger
3) Understand how to embed flow control constructs inside a for loop
4) Understand how to handle reaching the end of a string when decomposing it into smaller lines
Assignments:
1) Code a simple for loop that displays several prompts to the user. At each prompt, ask the user for a phrase. At the end, display the phrases on a single line. Here is a line of code of which you can make definite use: s += Console.ReadLine(); "s" is a string variable.The += means you can continue to add to the string without overwriting previous input into the string. Of course, you're free to devise your own algorithm. Also, be sure that the strings are capitalized, and have the program change the cases, and add commas. So, for example,
This is phrase 1.
This is phrase 2.
This is phrase 3
Become: This is phrase 1, this is phrase 2, and this is phrase 3.
2) Can you reproduce the logic of video example using a while loop? Give it a shot.
34
Coding For Loops
3 questions
35
Do While Loops
09:03
Why this matters: These loops are used when a block of code should run a minimum of one time. For example, we can use this, together with substring, to locate and count occurrences of characters. Of course, this example could be done in other ways.
Learning Results
1) Understand how to code a do/while loop
2) Understand how do/while loops execute
3) Understand a possible way of counting the number of times a character occurs in a string
Assignments:
1) Write code to take a value from a user. Use a do/while to display all the values between 0 and that number.
2) Write code to take a value from a user. Use a do/while to display all the values from the user between that number and 0, starting from that number and going down.
3) Use the debugger on the more advanced lecture code.
36
Do While Loops
2 questions
37
Coding Switch Blocks
07:14
Why this matters: This construct allows us to examine many possible cases of input very quickly and efficiently.
Learning Results:
1) Learn how to code a switch block
2) Use the locals window to observe the values of the variables, and step through the code line by line to understand how the switch statement behaves as the code runs
3) Learn how to use the the default statement in a switch block when no case is matched
Assignments:
1) Close the solution, and recreate the code as accurately as possible. Please be sure to step through it using the locals window so you can see how it behaves at every stage.
2) Create a program that switches on the fruit type entered. Also also get the number of fruits of a particular kind wanted. Have the program display the price. Make up the fruits and the prices.
3) Can you code the logical equivalent of the switch construct using if/else.. type of constructs?
4) Can you modify the code to apply a discount depending on the number of apples bought?You choose the discount.
38
Switch Blocks
3 questions
39
For Each Loops
05:33
Why this matters: For each loops allow us to execute a block of code repeatedly. For example, we can treat a string like a collection of characters, and then examine each character one step at a time until the string ends. Foreach loops are great because the programmer does not have to keep track of any index.
Learning Results
1) Understand how to code a foreach loop
2) Understand how to break a string into characters
3) Understand how a foreach loop executes using the debugger
Assignments:
1) Write a program that accepts input 2 times using a for loop. Combine the inputs into a single string. Then code a foreach loop to still display all the words as a column, as in the video.
40
For Each Loops
2 questions
41
Break and Continue Statements
06:45
Why this matters: These allow us to avoid unnecessary processing by getting to the top of a loop fast,or by breaking out of a loop fast.
Learning Results
1) Understand how to break out of a loop
2) Understand how to continue a loop
Assignments:
1) Write a for loop with a break that is activated after 5 turns.
2) Write a for loop with a continue that is activated when a number is divisible by 2. Use var%2==0 to check for this. The "%" operator returns the remainder after a division.
3) Of all the constructs presented so far, which one relies heavily on "break" statements?
42
Break and Continue Statements
2 questions
SECTION 4:
Operators
43
Logical And Operator
06:21
Why this matters: This operator can be used to short circuit processing, and to simplify complex nesting of if blocks
Learning Outcomes:
1) Understand how to use the && operator to check logical conditions
2) Understand that for this operator both conditions must be true for the code following the "if" to execute
3) Understand that this operator is considered a "short-circuiting" operator because if one condition fails, the other is not checked
Assignments:
1) Write a program that accepts two values as strings,checks whether these are more than 0 in length, then parses them into doubles, and displays sums, differences, products and ratios. If the value you're dividing by is 0, do not display the ratio.
44
Logical And Operator
2 questions
45
Logical Or Operator
04:58
Why this matters: This statement allows us to express logical conditions very compactly, just like the && operator.

Learning Outcomes

1) Learn how to code an "or" statement

2) Understand that the "or" statement in C# is inclusive, so it evaluates to true when one, or the other, or both conditions are true

3) Understand how to use the debugger to analyze the operation of this operator

Assignments:

1)Write a program that tells the user input a color, like red or blue. Check whether the user is going to use a card to pay for her blue or red shirt. If these conditions hold, display a message stating some discount on a purchase. Else, display another appropriate message.
46
Logical Or Operator
2 questions
47
Operators That Evaluate and Assign
07:13
Why this matters: These operators are very common, and save typing by being more compact. The form of these is the same in many modern languages, so you're learning something general.
Learning Outcomes:
1) Learn how to declare and initialize a variable
2) Learn how to evaluate and assign values to the same variable
3) Learn how to increment a variable before displaying its value
4) Learn how to decrement variables and more
Assignments:
1) Write code to figure out the difference between ++x and x++. These are not the same.
2) Write code to figure out the difference between --x and x--. These are not the same.
3) Write code for a for loop. Begin with a high value for the loop variable, and count down by 1. Convert the counter variable to a string, and grow the string by listing the values of the counter, as shown below. Display it using the appropriate version of Console.Write Your output should resemble the triangular pattern below.
10
10 9
10 9 8
....
48
Operators That Evaluate and Assign
4 questions
49
The Logical Negation Operator
05:32
Why this matters: This operator is used reverse truth values. This approach is used, for example, when creating web pages and checking whether a page has been submitted to the server.
Learning Results
1) Understand how the logical negation operator is coded
2) Understand how the logical negation operator is processed
Assignments:
1) Write a program that accepts several inputs of type "true" or "false" Display these with the truth values reversed. Use bool.Parse(Console.ReadLine()) at some point.
50
The Ternary Operator
05:03
Why this matters: this operator is very compact, and be used to replace simple if/else blocks
Learning Results
1) Understand how to code the ternary operator
2) Understand how to use tryParse to check whether a value can be parsed
3) Understand how to use the combination of tryParse and the ternary operator
Assignments:
1) Improve the current program so it prompts for user input continually
2) Improve the current program so it display an informative message if the input can't be converted to double form
3) Write a program that accepts two values, compares them, and then returns the bigger
4) Write a program that accepts two values, compares them, and then returns the smaller
51
Ternary Operator
3 questions
SECTION 5:
Arrays, Enumerations and Var and Dynamic
52
Basic Arrays
07:59
Why this matters: Arrays can be constructed to hold a variety of types. Arrays have a convenient syntax, and can be used to create more complex data types. Arrays are also stored so the access is fairly fast.
Learning Results
1) Understand the concept of an array
2) Understand how to declare and initialize a simple integer array
3) Understand how to assign to and read values from an array
4) Understand the concept of the 0 starting index
5) Understand that for an array of length n, the indices go from 0 to n-1
Assignments:
1) Create a program that accepts two strings, each on an individual line. This means three separate prompts,each for each own string.
2) Take the first character from each string above, and store them all to one array called firsts.
3) Take the rest of the characters from each string, and store those in an array called rests.
4) Perform proper casing procedures on the strings
5) Redisplay the strings properly cased.
For example, begin with
"this IS a Sunny Day"
"It's greAt to Be alive", and end with
"This is a sunny day."
"It's a great day to be alive."
53
Array Basics
3 questions
54
Looping Thru Arrays With For Loops
05:37
Why this matters: Because array values are accessible through an index, they are well suited for use with for loops.
Learning Results
1) Understand how to break a string into individual characters
2) Create a for loop, and set the correct starting value based on the array index
3) Convert array entries to a different data type
4) Watch the program execute in the locals window
Assignments:
1) Create a program that prompts users for input repeatedly. Accept three strings each time. Decompose each string into the first characters, and the rest of the characters. Store the first characters from each string in one array. Store the rest of the characters in each string in a separate array. Perform casing,and then display the strings recombined. Make this a for loop version of the assignment in the previous lesson.
55
Reference Type Variable
05:27
Why this matters: It's expected that you'll know the difference between simple types, like int, and reference types, like arrays. For example, if you had to copy arrays by value, as integers are copied, a huge array could take a long time and a large number of processor cycles to copy entry by entry. References help to avoid this.
Learning Results:
1) Understand how to fill an array at run time
2) Understand how to sort an array
3) Understand how reference type variables operate
Assignments:
1) Create an array storing decimals. Create three different references to the same array.Change the array using the last reference you make. Print the entries of the array using the other two references, and confirm that both reflect the change.
56
Reference Variables
3 questions
57
Using the "ref" Modifier in Function Calls
06:30
Why this matters: This keyword renders simple types(but not only) as passable by reference. This means you can access a simple type like a double in multiple places in a program. This means a value type variable can be accessed through multiple names.
Learning Outcomes:
1) Learn how to force C# to pass basic types like integer be reference
2) Learn how to use the "ref" keyword in both function calls and function headers
3) Write code to confirm this keyword works as described
Assignments:
1) Write a program that manipulates a simple type variable by passing names for it across three different methods.
58
Using Out Parameters to Return Multiple Values
05:49
Why this matters: This keyword allows you to return a variety of results from a single function call. It makes the function more powerful, and more flexible.
Learning Outcomes:
1) Understand a function can produce more than one output
2) Understand how to use the out modifier in function parameters and function calls
3) Understand how to display a value using the out modifier
Assignments:
1) Modify the lesson code by adding one more function, and one more description of its purpose.
2) Create your own application, implementing out variables, as in the video.
59
Creating and Understanding Multidimensional Arrays
09:15
Why this matters: Multidimensional arrays, for example, are used in statistical programming to represent matrices of data on variable measurements.
Learning Outcomes:
1) Understand that a multidimensional array is a table
2) Understand that fixing a row index means varying the column index
3) Understand that fixing a column index means varying the row index
4) Understand how to use two for loops to step through a multidimensional array
5) Understand how to address each cell using (i,j), where i is the row index, and j is the column index
6) Understand the difference between the index and the actual value stored at the given index
7) You can also you Microsoft Excel Online for free. Check the link attached.
Assignments:
1) Improve the program from the lesson by adding a feature that will allow the user to decide on the size of the table to make. Also, make the data display in matrix form, meaning rows and columns. The data to be displayed should show the indices at each location in the matrix.
There are supplemental videos attached below.
60
Multidimensional Arrays
3 questions
61
Passing Arrays as Function Arguments
06:43
Why this matters: In this example, we build our own function, and pass an array into it. There are many C# functions that operate on arrays also. These are built in, so they are very convenient.
Learning Outcomes:
1) Learn how to create an array
2) Learn how to pass an array as an argument into a function
3) Learn how to modify the array within a function
4) Understand that arrays are object types
5) Confirm that arrays are passed by reference
Assignments:
1) Write a program that accepts string values from a user. Have the values stored in an array. Pass that array to a function, and display all the strings properly cased.
62
Passing Arrays
3 questions
63
Using The Params Keyword in Function Headers
06:47
Why this matters: If you don't know in advance how many arguments you'll pass, consider using this approach. It's flexible, and can accommodate a large variety of data types.
Learning Outcomes:
1) Learn how to use the params keyword
2) Learn how to make use of the params keyword inside a function by using a for loop
3) Learn how to invoke a function with a different number of arguments
Assignments:
1) Write a program that can multiply several numbers together. For example, if the list is
1,2,3,4,5, it will display the product of each number with every other number.
1,2,3,4,5 (1 multiplied by every other number, including itself)
2,4,6,8,10 (2 multiplied by every other number, including itself)
3,6,9,12,15 (3 multiplied by every other number, including itself)
4,8,12,16,20
5,10,15,20,25
64
Params Keyword
2 questions
65
Enumerations
05:59
Why this matters: Enumerations allow you to replace difficult to remember things with easy to remember names.
Learning Outcomes:
1) Understand the purpose of an enumeration
2) Understand how to code an enumeration
3) Understand the underlying data type for an enumeration
4) Understand how to use an enumeration in code
Assignments:
1) Write a program that creates an enumeration for the months of the year.
2) Write a program that creates an enumeration for the possible states of a switch. Use 0 for off and 1 for on.
66
Enumerations
2 questions
67
Dynamic Data Typing
03:22
Why this matters: This is a powerful feature that is intelligent, and saves you trouble in terms of deciding on data types in advance. With this keyword, you can create flexible code that can operate on a variety of different data types seamlessly.
Learning Outcomes:
1) Learn how to declare dynamic data types
2) Understand that dynamic data types are resolved at run time
3) Understand that static typing is assigning data types at compile time
Assignments:
1) Write a program that prompts for two inputs. Also have the use decide whether the numbers should be treated as doubles or integers. Use dynamic variables, and code a switch block where the correct version of Parse is run. Display result of dividing the numbers if they are treated as doubles, or as integers.
68
Dynamic Data Types
3 questions
69
Var Keyword and Difference Between Var and Dynamic
05:47
Why this matters: This keyword is also popular in languages like JavaScript. It's designed to make your life as a programmer easier. But remember that the type of the variable is still known at compile time. This is simply a shorthand so you have less to remember.
Learning Results:
1) Understand how to use the var keyword
2) Understand what the purpose is of the var keyword
Assignments:
1) Use var for all the variable types in this program. Write a program that accepts a sentence. Using a foreach loop, convert the sentence into a character array. Display the array in sorted order. For example, inputting 9989238757 should show the result in sorted order. Inputting baacddeaad should show the result in sorted order. Also, display the first and last entries of the sorted array.
SECTION 6:
Object Oriented Programming
70
Create a Simple Class
06:21
Why this matters: The whole .Net framework is based on classes. People will ask you many questions about this on interviews. This is something to be known inside out.
Learning Outcomes:
1) Create a new class using the correct syntax
2) Write a constructor for the class
3) Declare an instance of the class, and initialize the instance
4) Understand that the default value for objects is null
5) Understand the concept of a reference as a name that refers to memory location
Assignments:
1) Make three classes. Call them Table, Chair and BookShelf. Place them inside an appropriately named namespace. Create a constructor for each class, and then create instances of the class. Be sure the constructor code displays a message about the state of the object.
71
Simple Classes
3 questions
72
Create a Class With a Constructor, and a Behavior
08:08
Why this matters: A class that doesn't perform something useful is not of much value. Behavior is implemented with method or functions.
Learning Outcomes:
1) Create a simple console project
2) Create a new class
3) Create a constructor
4) Create one method for performing addition
5) Write code in the main method for calling the code specified in the calculator class
6) Use the locals window and the method stack to observe the values of the variables for maximum clarity during program execution
Assignments:
1) Create three different classes. Create a constructor for each class, and define one behavior for each class. Implement the behavior with a method. Write a class that makes instances of your types, and calls the methods.
73
Create a Class with Four Functions
07:47
Why this matters: Classes of a realistic size can perform many different behaviors because the world is made that way. Part of learning in terms of OOP is the ability to abstract. This means learning how to find the essence of what is really important, and then how to implement it in code.
Learning Outcomes:
1) Create a class
2) Create a constructor
3) Create four methods, or functions, for performing tasks
4) Run the code, and observe the behavior of the code in memory
5) Run the code, and observe the order of execution on the call stack
Assignments:
1) Create a financial calculator class. Use I=Prt. Here, I=Interest, P=Principal Invested, r=rate and t=time. Create three separate methods to return either the interest given P,r and t, or to return P given I,r and t or to return r given I,P and t. Below are formulas.
I=Prt
t=I/(Pr)
r=I/(Pt)
2) Create a class called MyArray. Add methods to the class that accept dynamic arrays, and then reverse, sum and average the array.
74
Classes With Functions
6 questions
75
Modern Functions with Func<,,,,>
07:42
Why this matters: Microsoft is replacing a lot of clunky and space taking syntax with modern, more streamlined versions. As you can see from this video, the amount of space required to write code is drastically reduced. Less code, less chance for error.
Learning Results
1) Understand how to use modern function syntax
2) Understand the basics of Lambda expressions
3) Understand the benefits of this approach
Assignments:
1) Since division by 0 is not defined in mathematics, put a wrapper around the call to divide to ensure that it's handled gracefully. Use an if/else block.
2) Add another function to the functions block to handle finding the absolute value of a number.
3) Add a feature that will allow the user to specify the number of digits used for rounding. You'll have to reconfigure the functions with additional parameters.
76
Modern Functions
3 questions
77
Instance Variables
08:26
Why this matters: If it were not possible to store information about objects, OOP would not be very useful.
Learning Results
1) Understand how to create instance variables
2) Understand that each instance has its own variable values
3) Understand the concept of state as stored in the values of instance variables
4) Understand how to create a parametrized constructor
5) Understand how to use the "this" keyword
Assignments:
1) Create a class called Window. Define two instance variables called height and width. Create a method called ConfigureWindow. Inside the method, use the values of the instance variables of a window object to set the height and width of the console window.When you write Console, scroll through the intellisense list, and find the correct properties to set inside ConfigureWindow. Enclose the code inside while(true) to allow the user to keep reconfiguring the console window size.
78
Instance Variables
3 questions
79
Class Level Shared Fields
11:29
Why this matters: Information that is to be the same, regardless of any specific instance, can be placed in a static field. This helps to minimize memory usage, since there is only one copy shared, instead of multiple copies.
Learning Results
1) Understand how to create an external class
2) Understand how to create class level fields
3) Understand how to write functions to access instance and class level fields
Assignments:
1) Improve the video program by adding a second Console.WriteLine to display information on the second object.
2) Create your own class with a static field, and some instance variables. For example, class Mammal. Look up what the characteristics are that all mammals share, and put them in static fields. Put characteristics that vary in regular fields. Create an array of such mammals. Then create a foreach loop that operate on objects of type Mammal.
80
Class Level Fields
5 questions
81
Simple Inheritance Example
07:25
Why this matters: Inheritance allows us to centralize code. Place code common to all classes inside the parent class. This way it can be used without having to be rewritten.
Learning Results
1) Understand how to build a simple hierarchy of classes
2) Understand the use of the protected keyword
3) Understand how to call a parent level method
Assignments:
1) Add a Square class to the video code. Make it inherit from Quad. Add a function unique to Square that finds its perimeter. Add a call to the base class also.
2) Devise your own simple class hierarchy. Think about the behaviors and fields that should be placed in the parent class, and which should be refined in the child classes. For example, a class called Average can be the parent class.Classes called ArithmeticAverage, HarmonicAverage, and GeometricAverage could be child classes. The definitions of these are below in a PDF. I show you how to do the arithmetic and harmonic averages. Can you figure out how to do the geometric one?
82
"Is A" Relationship in OOP
05:44
Why this matters: Understanding this concept, among others, allows you to design solid class relationships.
Learning Outcomes:
1) Understand the nature of the "IS A" relationship in object oriented programming
2) Understand how to derive from a base class
3) Understand how to call a base class constructor explicitly
4) Understand how to add a refinement to a subclass to increase specificity
Assignments:
1) Create a class called Calculator. Place some common functionality inside this class. For example, all calculators should be able to add, subtract, divide and multiply. Add a class called FinancialCalculator. To this class add a method that can calculate interest from I=Prt. Create another class called PowerCalculator. Add a method to this one that can return the power of a number.
83
Simple Inheritance and 'Is A'
9 questions
84
Equality By Reference
06:40
Why this matters: In programming languages, there are several kinds of equality. This one checks whether two references point to the same object, meaning the same memory locations.
Learning Outcomes:
1) Create a class
2) Create two instances of the class
3) Make the references point to the same memory location
4) Observe how changing the instance through one references shows in the other reference
5) Learn how to assign values directly inside function calls
Assignments:
1) Create a class of your own. Create an instance of the class. Create 10 more instances of the class to put inside an array. Assign to each entry in the array the original reference. Change only the first entry in the array by changing the instance variables of that entry. Does this have any impact on the rest of the objects inside the array?
85
Equality By Reference
3 questions
86
Coding Properties
06:38
Why this matters: Properties are commonplace, and expose access to objects and their fields in a controlled, but simpler way than functions. Properties play a big role in graphical programming in Windows.
Learning Outcomes:
1) Declare a class
2) Add two instance fields
3) Add two properties
4) Write code to use the properties
5) Observe the behavior of the code in memory
Assignments:
1) Create a program. Write code to set the vertical and horizontal dimensions of the console window. Make sure if the input is bigger than the largest allowed, that case is handled. Also, add code that will allow switching background color. Put this code in a loop.
87
Coding Properties
3 questions
88
Creating and Using Virtual Methods
06:49
Why this matters: Use virtual methods in parent classes. If needed, in the child class, use the override keyword, and provide a refined version of the method. If in a parent class you change the implementation of a virtual method, the subclass code is not affected because it overrides the virtual method. This means the design is more flexible.
Learning Outcomes:
1) Code a base class
2) Code a child class
3) Use the virtual keyword and the override keyword
4) Understand the purpose of a virtual method
5) Create an object, and call the overriding method on the object
Assignments:
1) Create a class hierarchy. Start with a class called Shapes. Inside Shapes, create a virtual method called Area. Create several child classes called Square, Triangle and Rectangle. Add constructors to the subclasses, and call the base class constructors. Add Area methods to the subclasses to override the Area method inside the parent class.
89
Creating and Using Virtual Methods
3 questions
90
Understanding Upcasting
10:51
Why this matters: Upcasting allows us to treat child objects as if they were parent objects. This is natural because a "Truck" is a kind of vehicle. You might do this when your focus is on the most general characteristics of your classes.
Learning Outcomes:
1) Understand that classes fit inside a namespace
2) Create a small class hierarchy
3) Create an object declared using the base type, and assign to it an object of the child class
4) Observe the behavior of the code in memory as the program runs
Assignments:
1) Create a class hierarchy. Start with Shape as the parent class. Add a virtual method, and override it in a couple child classes. In Main, instead of declaring the types of the child objects, declare them all to be of type Shape. Call the overriden method on the child objects. Is the parent level, or child level method called? You can use the classes developed in the assignment in the previous lesson.
Note: To get the solution for this exercise, just use the one from the previous one, replacing Square, Triangle and so on as shown in the video.
91
Abstract Classes
08:29
Why this matters:Abstract classes are good for creating components. Components are bits of reusable code. Once you derive from an abstract class, you must implement all the members of the class. Abstract classes are good because if the class needs to change, all the derived classes are automatically updated. Use abstract classes when you need a parent class, but this parent class is application specific, and incomplete in some sense without its child classes. Also, since it contains method signatures, there is no good default code to put there.
Learning Outcomes:
1) Create an abstract class
2) Understand the purpose of abstract class
3) Understand that methods declared as abstract must be overridden in child classes
4) Run the code and observe the behavior of the variables in memory
Assignments:
1) Improve the code in the lesson by adding an abstract perimeter method. Be sure to implement it in the child class.
2) Devise your own abstract class. Add a couple abstract members to the class. Derive from the class, and implement the members. Remember that you're thinking of a class that is application specific, but incomplete in some sense without its child classes. Also, make sure the methods are such that you can't really think of any good default code to place there. That's how you can decide on whether it's abstract or not. For example, think of the volume and surface area of a 3d shape. These are shapes, such as spheres and cubes, but the formulas for volumes and surfaces are so very different from shape to shape, that ThreeDShape could be an abstract class with a couple virtual methods for volume and surface area.
3) Recreate the averages question using Abstract classes. This is Question 2 under Lecture 47. This makes sense to recreate as abstract because an average in general summarizes information, but the specific details of computation vary widely from type to type.
92
Abstract Classes
4 questions
93
Create a List of Objects and Step Through It
07:35
Why this matters: Generic lists(and generics in general) are powerful because they allow us to operate on a great variety of data types easily.
Learning Outcomes:
1) Create a class
2) Create a list of Person types
3) Use the add method on the list
4) Use a foreach loop to read entries from the list
5) Run the code and see it behave live in memory
Assignments:
1) Create a list of doubles. Prompt for user input continually to illustrate how the list can grow automatically. Display the results sorted.
94
Lists
5 questions
95
Polymorphism
09:38
Why this matters: Together with encapsulation, and inheritance, polymorphism is a fundamental pillar of OOP. People are likely to ask you questions about these concepts on job interviews. Know them. In this example, even though the list stores shapes, at run time the correct subclass method is called each time.
Learning Results
1) Understand the concept of polymorphism
2) Understand the meaning of the word polymorphism
3) Understand how polymorphism is implemented in code
Assignments:
1) Create a class structure with three sales person levels. Make the constructor for each class take the name, and an array of decimal sales amounts. Sum the values in the array in a method called TotalComm, and return the commission on each sales amount. Define the TotalComm method inside the parent class, and then override it in each child class. For example, 5% or 6% of the total sum of sales for each level of sales person.
96
Polymorphism
3 questions
97
Structs
07:19
Why this matters: Structs are good for representing simple composite constructs like points.

Learning Results
1) Understand how to make a struct
2) Understand how to make a class
3) Understand how to parametrize function headers with structs, and classes
4) Understand that structs are value types
Assignments:
1) Create a struct to represent a point of the form (x,y). Have the user assign values to the x and y coordinates. Add a function to move the point. Add a dialog box that displays a message with yes/no buttons, and prompt for input continually. Note: This exercise is more challenging because it requires the addition of a namespace called Forms. It might be better to watch the solution.You'll learn several new things.
98
Structs
3 questions
99
Overloading Operators
06:53
Why this matters: Being able to overload operators makes your code more flexible. You can define meanings for symbols as you please.
Learning Results:
1) Understand how to create an overloaded operator
2) Understand how to return a new object from an operator
3) Understand how to use operator on two objects
Assignments:
1) Create a subtraction operator for the class in the video. Define it as you see fit.
2) Create a class called Point. Define an addition operator that will return the result of adding two points. You define the meaning as you see fit. The solution is given in Lecture56operatoroverloadingsolutions.pdf.
3) Create a class called PDFDocument. Accept input twice, treating each one as a separate PDF document. Define an addition operator for two PDF documents. Ensure that the two lines of text are are placed on separate lines.
100
Overloading Operators
2 questions
101
Delegates
04:41
Why this matters: Delegates are used widely in event driven programming in windows graphical interfaces.
Learning Results
1) Understand how to declare a delegate
2) Understand how delegates wrap method calls
3) Understand how to call a delegate
Assignments:
1) Create a delegate and a class. Create a couple different methods inside the class. Call them both through the same delegate. You can assign new functions to delegates just the way you assign new values to variables.
102
Delegates
3 questions
103
Dynamic Actions
05:01
Why this matters: Actions, as presented here, are simpler versions of delegates. Thus, you have a more compact syntax for achieving the equivalent of a simple delegate.
Learning Results
1) Understand how to create an action
2) Understand how to call an action
3) Understand that simple actions like this one are just delegates
Assignments:
1) Create an action that takes a string, and displays the number of blank spaces in the string. Make the program prompt for input, and then break out once somebody types Exit.
104
Interfaces
07:40
Why this matters: Interfaces are essentially contracts. A class in C# can implement multiple interfaces, but inherit from only a single class. Many interfaces end in "able", so think "can be used". For example, IPrintable implemented would make an object usable as something printable. But the same class can implement multiple interfaces, so it can also "be used as" IStorable, and so on.
Learning Results:
1) Understand the purpose of an interface
2) Understand the fundamental difference between an interface, and a class
3) Understand that classes have a "IS A" type of relationship to their child classes
4) Understand that a class that implements an interface can DO, or CAN BE USED AS that interface
5) Expresses interface concepts in code
6) Run the code, and understand the interfaces can be used as types
Assignments:
1) Create an interface called IStorable, and add a couple methods to it like WriteToHardDrive, and WriteToGoogleDrive, and WriteToPDF. Create a class that implements that interface, and create particular implementations of these methods. For example, classes "WordDocument", "OpenOfficeDocument" and "WordPadDocument" might be a start . Accept some user input, and pretend to save the text by using one of the functions. The solution below is for a generic Document class, but you can easily extend it to additional classes.
105
Interfaces
3 questions
106
Access Modifiers
07:28
Why this matters: Access modifiers are an integral part of writing good code. They enable you to control who has access to your code, so the parts that should be protected stay protected.
Learning Results:
1) Learn how to use the public keyword
2) Learn how to use the private keyword
3) Learn how to use the protected keyword
4) Learn how to use the keyword static with class members
Assignments:
1) Create a class structure of your own. Place the class files in separate files. You can do this easily by following what was done in the previous lesson on interfaces. Just choose to add a class instead. Place a class with a Main method inside one file. Place a class that does something else inside another file. Try different combinations of access modifier keywords with this setup.For example, using the video, place the Parent class in one file. Place the Child class in another file. Place the NotConnected class in another file. Lastly, place the Program class in a separate file.
107
Access Modifers
4 questions
108
Destructors
06:24
Why this matters: Destructors can be called when freeing up system resources like windows, files and similar. You can also call the Dispose method, but destructors add extra protection in case Dispose fails.
Learning Outcomes:
1) Learn how to code a destructor
2) Learn how to use the Stopwatch class
3) Learn how to see how long an object lives
Assignments:
1) Create a class hierarchy. Add a parent class, and a child class. Add constructors and destructors to both classes. Create an instance of the child class, and step through the class hierarchy using the debugger. Make sure you have the destructors print messages so you can see when they are called.
109
Destructors
3 questions
110
Partial Classes
04:55
Why this matters: Partial classes are used widely in graphical programming in windows. This is so because the code is complex, and this approach helps to tame that complexity.
Learning Results
1) Understand how to create a couple class files
2) Understand how to split a single class over multiple files
3) Understand how to use such a class
Assignments:
1) Create a class of your own. Split the class over two separate files. Place constructors, and fields in one file, and behaviors in another file. Create a third class file to make use of the other two.
111
Partial Classes
3 questions
SECTION 7:
Error Handling
112
Error Checking with Simple If/Else Statements
05:39
Why this matters: Error detection and handling is an integral component of design. Applications should not crash, but should handle exceptions gracefully, and continue.
Learning Outcomes:
1) Understand why error checking is necessary
2) Understand how to perform a simple check for possible errors using if/else
Assignments:
1) Extend the application by adding the ability to input values repeatedly.
2) Extend the application by adding additional methods to handle other operations.
3) Does your application continue to work even when somebody enters a zero as the divisor?
113
Try/Catch/Finally Blocks
05:20
Why this matters: The Try/Catch/Finally constructs are very important because they form the core of handling exceptions gracefully. The example you see here is very much the same in appearance in other languages like Java. Inside the Try, you try to get resources. Inside the Catch, you handle exceptions events. Inside the Finally, you release resources.
Learning Outcomes:
1) Understand the purpose of error checking
2) Understand the purpose of a try block
3) Understand the purpose of a catch block
4) Understand the purpose of a finally block
5) Use the locals window, and the call stack to observe the behavior of the code in memory
Assignments:
1) Create an application that reads two values from the user. Enclose the portion that reads the values inside a Try. Be sure to use double.Parse, or something similar. If somebody enters a value that cannot be converted to a number, have a Catch block display a message. Use the "FormatException" class in the Catch block. Don't include a Finally block. Enclose the try/catch inside a while(true)
114
Multiple Catch Blocks
06:17
Why this matters: Realistic applications could have multiple sources of exceptions. There are many classes in the .Net framework for handling these gracefully.
Learning Outcomes:
1) Learn how to generate multiple kinds of exceptions
2) Learn how to catch multiple kinds of exceptions
115
Throwing and Catching Exceptions
05:56
Why this matters: Throwing exceptions allows you to handle them. Add useful information along the way to make debugging easier.
Learning Results:
1) Learn how to generate exceptions
2) Learn how to throw and catch exceptions
Assignments:
1) Create an application that throws a FormatException.
116
Error Catching and Handling
5 questions
SECTION 8:
The Object Class
117
Object Equals and Reference Equals
04:42
Why this matters: Knowing how to compare objects is a basic skills. There are two major ways: either by value, as in simple types like integer, or by reference, as in video example.
Learning Outcome:
1) Learn how to use the equals function
2) Learn how to use the reference equals function
3) Understand that equality of references means two or more names pointing to the same memory
Assignments:
Create a complex class with several fields, and properties. Collect that information from the user. Create two objects using the supplied information. Compare them at the end, and tell the user whether they are the same by reference.
118
Get Type Method
04:19
Why this matters: This method allows us to determine the type of an objects. It can be used to do a kind of comparison of objects.
Learning Outcomes:
1) Learn how to use the get type method
2) Learn how to compare two objects to see whether they're of the same type
119
The Object Class
3 questions
SECTION 9:
Miscellania
120
Turning Objects Into Arrays with Indexers
05:34
Why this matters: People love this question on interviews.
Learning Results:
1) Define an indexer in code
2) Understand the purpose of an indexer
3) Code a for loop, and use array notation to access values in the object
4) Code get and set blocks to read and assign values through an indexer
Assignments:
1) Create a class, and create an indexer for the class. Call the indexer using a for loop, as shown in the video.
121
Indexers
3 questions
122
Writing and Reading Files
05:34
Why this matters: Programs that can't save to files are not of much use.
Learning Outcomes:
1) Create a file on the hard drive
2) Save text typed into the console window to the file
3) Close stream to ensure no memory leaks
4) Open a stream to access the file
5) Retrieve text from file
6) Display text to the console window
7) Confirm file has been actually created and saved by searching for it in the file system
123
Writing and Reading Files
3 questions
124
Conditional Functions
08:15
Why this matters: This is a nice feature that makes certain methods available only when debugging, and disables them in the release version of software.
Learning Outcomes:
1) Understand the concept of a conditional function
2) Understand the concept of release and debug mode for software
3) Understand how to turn on debug and release modes in Visual Studio
125
Conditional Functions
2 questions
126
Nullable Data Types
05:46
Why this matters: Nullable types are important when dealing with databases, where entries may not be supplied. In that case, null is the value.
Learning Outcomes:
1) Learn how to do declare nullable types
2) Learn how to use the "hasvalue" property value types
3) Learn what the purpose is of nullable types
127
Nullable Data Types
3 questions
128
Creating and Using Dynamic Link Libraries
07:40
Why this matters: DLL's are very common, and allow us to share functionality easily across programs.
Learning Outcomes:
1) Create a class library
2) Create a new console app
3) Add a reference to the DLL
4) Reference the namespace
5) Use functions from the DLL
Assignments:
1) Create your own DLL that does something useful. You decided on the functionality it provides. Be sure you reference it in a client application.
129
Dynamic Link Libraries
3 questions
130
Fully Qualified Names
09:38
Why this matters: Understanding fully qualified names indicates you have a strong sense of the over logical structure of namespaces, classes, and other constructs.
Learning Outcomes:
1) Understand how to create a file with two namespaces
2) Understand how to create a DLL
3) Understand how to code a fully qualified name
4 Understand how to use the "using" block to avoid having to type long names
Assignments:
1) Create your own structures spread over several files. Be sure you understand how the namespaces, classes, methods and related constructs all fit together.
131
Fully Qualified Names
3 questions
132
Displaying Files and Folders in a Directory
06:23
Why this matters: In this video, you learn about several very useful classes for accessing files and folders.
Learning Results
1) Understand how to display files and folders in a folder
133
Displaying Files and Folders In A Directory
3 questions
SECTION 10:
Modern Language Features
134
Generics Introduction
07:34
Why this matters: Generics add a great deal of flexibility to code because a single class can work on several different data types.
Learning Results
1) Understand how to code a generic class
2) Understand how the purpose of a generic class
3) Understand how to use a generic class
Assignments:
1) Reproduce the logic of the video, but devise your own classes, adding more fields and methods. Be sure to test your class with several different data types to convince yourself of the value of generics.
135
List<T> With Predefined Types
05:44
Why this matters: Generics are flexible and powerful, and , as this video shows, they can operate on a variety of types. This means you don't have to create many different classes.
Learning Results
1) Understand the concept of a generic list
2) Understand that generic lists are parametrized, which means that they can store different data types
3) Understand that there is a great variety of built in functions that can be used with generic lists
Assignments:
1) Create a program that prompts for input continually. Store the values in a list of doubles. Create an abstract class average. Put an abstract method called ComputeAverage inside Average. Derive two classes called HarmonicAverage and ArithmeticAverage, and implement Compute Average. (This is already down in previous exercises). After you collect as many values as needed from the user, call ToArray() on the list to convert it to an array and then call ComputeAverage on instances of each type.
136
List<T> With A User Defined Type
05:52
Why this matters: Generics are powerful, and when you combine them with your own types, you get really flexible code.
Learning Results
1) Understand the concept of a generic list
2) Understand that generic lists are parametrized, which means that they can store different data types
3) Understand that there is a great variety of built in functions that can be used with generic lists
4) Understand how a generic list can be made to work with user created types
Assignments:
1) Create a class of your own. Make sure the class has a couple different fields. Add a couple properties to your class. Have the user specify the size of the list through the command prompt. Generate as many objects as the user says, and then display them all using a foreach loop.
137
Generic Interface With One Class
05:19
Why this matters: Generics are already very flexible. Interfaces help to ensure consistency as a contract. Combining generics with interfaces gives flexibility, and consistency.
Learning Results
1) Understand how to code a generic interface
2) Understand how to code a class that uses a generic interface
Assignments:
1) Take the code from the lesson, and create one more class. Have that class implement the interface. Create objects of both types. Confirm that both classes can operate on several different data types equally well.
138
Generic Dictionaries
06:58
Why this matters: Key value pairs are used widely. For example, these can be used in web technologies to store information in local storage. The example you see is in C#, but the syntax is much the same across many programming languages.
Learning Results
1) Understand that the Dictionary class as shown here is generic
2) Understand the concept of a key-value pair
3) Understand how to view the key value pairs as a program runs
Assignments:
1) Create your own dictionary. Try a different data type. For example, try generating a large number of key-value pairs using a for loop. Be sure to retrieve and display them.
139
Lambda Expression Basics
06:37
Why this matters: Lambdas have been gaining popularity steadily over the last several years. They are convenient and expressive, and work well with LINQ.
Learning Outcomes
1) Understand how to construct a simple lambda expression
2) Understand how to execute a simple lambda expression
3) Understand the connection between delegate and lambda expressions
Assignments:
1) Create a couple more lambdas. Have them divide and subtract. Have the results rounded to a user specified number of digits.
140
Modern Languages Features
5 questions
SECTION 11:
Pointers and More
141
Pointers and AddressOf Operator
04:44
Why this matters: Pointers give us direct access to memory. They are used heavily in game programming, but take a more sophisticated form. Also, they are used when dealing with native functions.
Learning Outcomes:
1) Understand what a pointer is
2) Understand how to view memory addresses in the locals window
3) Understand how to use the unsafe keyword
Assignments:
1) Can you use pointers with strings?
2) Can you create an array of pointers?
142
Using Using Statements
05:18
Why this matters: Using statements are very compact, and take care of resource cleanup automatically.
Learning Outcomes:
1) Understand how to code using blocks
2) Understand the purpose of using blocks
3) Perform basic file writing and reading
Assignments:
1) Redo the code so it work with StreamWriter and StreamReader
2) See whether you can improve the code so the path where the file is saved can be entered by the user.
143
Serialization Example
10:17
Why this matters: Serialization is a mechanism that allows objects to be stored, communicated, and reconstructed across networks. The example here shows how to do it with a hard drive.
Learning Results
1) Understand how to serialize an object
2) Understand what the purpose is of serialization
Assignments:
1) Enlarge the code by adding a method. Reconstitute the object, as in the video, and make sure the method can still be called on the reconstituted object.
144
Pointers and More
3 questions
SECTION 12:
Database and LINQ Basics
145
Downloading and Installing SQL Server
03:03
Why this matters: SQL Server is very widely used. You should be aware of its existence. Clearly, the whole modern computer age runs on databases.
Learning Resources
1) Understand where to get SQL Server Express
2) Understand how to decide whether your system is 32 or 64 bit
3) Be sure to say yes to integrated security during the installation process
146
Write Code To Connect to SQL Server
13:35
Why this matters: Virtually all modern applications are expected to connect to databases. This is your introduction to this vast topic.
Learning Results
1) Write code for connecting to databases
2) Write code with the "using" block to ensure the resources involved in connecting to a database are cleaned up property
3) Write code with the try/catch construct in place to ensure that any exceptions are caught
Assignments:
1) Add more columns to the table. Modify the C# code to display those new columns.
2) Remove the catch, but leave the try. Does the code work?
3) Remove the try and the catch., and misspell the name of the server. Does a useful message appear?
147
Use LINQ With Arrays
07:05
Why this matters: Linq is a popular data access mechanism you can embed directly in your code.
Learning Results
1) Understand how to accept user input and make arrays
2) Understand how to write a simple LINQ query to get values out of an array based on a condition
3) Understand how to display the results
Assignments:
1) Rewrite the code so it shows a message if the value is less or equal to 0, or more than or equal to 10.
2) Rewrite the code so it grabs values between 10 and 20, and displays the average of that subset.
3) Rewrite the code so it grabs values between 10 and 20, and displays their sum.
148
Use LINQ with XML
07:07
Why this matters: XML is another widely used data description language. This video shows you how to combine XML and Linq.
Learning Results
1) Understand how to create a simple XML file
2) Understand how to connect to the XML file using C#
3) Understand how to retrieve data from the XML file
Assignments:
1) Create your own XML file.
2) Write C# code, as in the video, to access the file and display the results.
149
Use LINQ with Strings
06:05
Why this matters: Linq simplifies working with strings. For example, searching strings becomes much easier than it might be otherwise, as shown in the video.
Learning Results
1) Understand how to read and convert input
2) Understand how to make an arrays from a long string
3) Understand how to use a Linq query to count the number of times a string occurs
Assignments:
1) Accept a string. Show the string broken into individual words, but choose only those words that begin with a letter chosen by the user. Make this run on a loop.
150
Databases and Linq Basics
5 questions
SECTION 13:
Threading and Async
151
Creating, Running, Suspending and Joining Threads
07:22
Why this matters: Threading is helpful because it can help prevent unresponsive programs by running multiple threads to handle the user interface, and some other tasks that have to run in the background, as simple examples.
Learning Results
1) Start a new thread
2) Pause a thread
3) Block the calling thread and then finish it up
4) Understand the basics of the thread window
Assignments:
1) Create two separate threads. Have them run in proper sequence. At the end, return to Main.
2) Create a program that displays an arrangement of X's on the screen. The position of the X's should be random. Solution is below.
SECTION 14:
Text Editor Project
152
Make User Interface and Add Open Dialog
13:36
Why this matters: Virtually every app should have a feature to open files.
Learning Results
1) Understand how to add a file open dialog, and read a file
153
Add a Dialog For Saving
06:42
Why this matters: Most programs should have a feature to save files.
Learning Results
1) Understand how to add a dialog for saving files
154
Add Previewing and Printing
12:26
Why this matters: Programs should be able to print, either to a printer, or a drive like Google Drive, or a PDF.
Learning Results
1) Understand how to add printing functions and how to print to a PDF
2) Understand how to add previewing features
Assignments:
1) Add features that will allow a user to specify the font, color, and related.
2) Deploy the app. to be sure it installs on your computer and works correctly.
SECTION 15:
Build A Guessing Game
155
Build a Small Guessing Game
11:24
Why this matters: As in console apps., graphical apps are much more powerful when you can make decisions.
Learning Results
1) Understand how to nest if/else blocks
2) Understand how to use the key-up event in Windows Forms
3) Understand how to view events and properties in categorized and alphabetical order
Assignments:
1) Can you figure out how to make the number you're guessing against random? Refer to lesson 95 below for a hint.
SECTION 16:
Garbage Collection
156
Garbage Collection and Memory Observation
08:40
Why this matters: Understand how your program uses memory is important because your app. could start consuming all system resources if it's not well designed.
Learning Results
1) Understand how to see memory used by program
2) Understand how to observe a program as it takes more memory in Task Manager
SECTION 17:
Projects
157
Grade Computation Program
Text
Look at the PDF attached for a possible solution. Keep in mind this just my approach, and given the size of the assignment, your solution could be considerably different.
158
Example of Async and Await
11:27
Why this matters: Asynchrony is powerful because it allows us to improve program responsiveness. For example, in this video, while we get the HTML code of a page, we draw shapes on the form.
Learning Results
1) Understand how to use the await keyword
2) Understand how to use the async keyword
3) Understand the concept of asynchrony
159
Various Videos
Text
This is a collection of various videos illustrating a variety of concepts.
SECTION 18:
Conclusion
160
Next Steps
Text

حجم فایل: 1.3GB