Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
applying Sally's suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
speudusa committed Oct 19, 2022
2 parents 73c15e7 + 6adf577 commit 6db4825
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 172 deletions.
2 changes: 1 addition & 1 deletion src/chapters/exceptions/common-exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extend the ``System.Exception`` class.
`here <https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/exceptions/creating-and-throwing-exceptions#defining-exception-classes>`__.

The examples in this table are excerpted from
`this page <https://docs.microsoft.com/en-us/dotnet/api/system.exception?view=netframework-4.8#choosing-standard-exceptions>`__,
`this page <https://learn.microsoft.com/en-us/dotnet/api/system.exception?view=net-6.0#choosing-standard-exceptions>`__,
where you can find several other commonly used exception types.

.. list-table:: Common Exception Types in C#
Expand Down
4 changes: 3 additions & 1 deletion src/chapters/exceptions/exercises.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Exercises: Exceptions
=====================

To get started, fork and clone this `repo <https://github.com/LaunchCodeEducation/csharp-web-dev-exceptions>`_ from Github.
To get started, fork and clone this `repo <https://github.com/LaunchCodeEducation/ExceptionsInCSharp>`_ from Github.

You will be working in the **ExceptionExercises** directory of the repository.

Divide By Zero!
---------------
Expand Down
78 changes: 52 additions & 26 deletions src/chapters/introduction-and-setup/mac-setup.rst
Original file line number Diff line number Diff line change
@@ -1,42 +1,68 @@
Mac Users: Visual Studio for Mac
================================

#. Check that you are using supported MacOS version `here <https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31#supported-operating-systems>`__.
Before you start the installation guide, read through each step below.
You will find the recommended features and functionality to install listed in each step.

#. Download `Visual Studio for Mac <https://visualstudio.microsoft.com/vs/mac/net/>`__. You may be prompted for your
computer's password to complete the download and begin installation.
.. admonition:: Warning

#. The first choice you will need to make in the setup process are the development platforms you want to include in
the install with Visual Studio. Select **.NET Core** only.
Allow at least **an hour** for the installation process.

.. figure:: ./figures/vsmac-dotnetcore-install.png
:alt: Select Visual Studio .NET Core package to install.
Installation Steps
------------------
Walk through the installation process by following Microsoft's `Install Visual Studio for Mac <https://learn.microsoft.com/en-us/visualstudio/mac/installation?view=vsmac-2022>`_ guide.

Select .NET Core package to install.
**Prerequisites**

Check out that you can install this on your computer.

#. Once installed, the IDE will open on it's own. If it does not, you may need to open it manually. You will next
see a window asking you to login to your Microsoft account. You do not need to sign-in in order to use the
IDE for this class and can select *I'll do this later* to continue setup.
**Install Visual Studio**

.. figure:: ./figures/vsmac-microsoft-account.png
:alt: Visual Studio Microsoft sign-in page.
#. Download the installer.

Visual Studio Microsoft sign-in page.

#. Next you will be asked to choose which shortcut system to use. You may not have a preference yet and can always
change this later. If you are familiar with the text editor Visual Studio Code, this may be a good starting option
for you.
#. Install using the *.dmg* file.

.. figure:: ./figures/vsmac-shortcut-selection.png
:alt: Visual Studio keyboard shortcut selection.
#. Open the application.

Visual Studio keyboard shortcut selection.
#. Continue if you agree with the privacy statements and license terms.

#. Finally, you have made it to the project selection window. This will be the item you will see when you open
Visual Studio. You do not need to create or open a new project just yet.
#. The only component required for this course is **.NET**.

You can modify this later as you gain more coding experience.

.. figure:: ./figures/vsmac-project-opener.png
:alt: Visual Studio opening project selection pane.
#. Select the **Install** button.

Visual Studio opening project selection pane.
#. Assist the installer as needed.

This may take a while, but stick around.
You may be asked to enter your password a few times.

#. To personalize or not? This is up to you.

Microsoft Account
Creating a Microsoft account is optional.

Keyboard Shortcuts
The default is Visual Studio for Mac and that is a good starting option.
You can change this later.

#. Launch Visual Studio and start developing


A Tour of Your New IDE
----------------------

Microsoft has created a `walkthrough <https://learn.microsoft.com/en-us/visualstudio/mac/ide-tour?view=vsmac-2022>`_ of the Visual Studio 2022 for Mac.
We recommend you read through this to learn the location of key components within your new IDE.


Troubleshooting
---------------

Already have Visual Studio on Your Computer?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you don’t have this most recent version of Visual Studio installed, you will need to updated it.
The `Update Visual Studio for Mac Guide <https://learn.microsoft.com/en-us/visualstudio/mac/update?view=vsmac-2022>`_ can help you update your old version of VS to the latest.
At the time of this writing, the current version for the course is 2022.

Updating can also help you keep any of your workloads, extensions, or other installed packages up to date.
70 changes: 43 additions & 27 deletions src/chapters/introduction-and-setup/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,66 @@ For the entirety of this course, we will be coding in C# with the help of Visual

.. _install-visual-studio:

Visual Studio
-------------
The Integrated Development Environment
--------------------------------------

Visual Studio is an **integrated development environment (IDE)**. An IDE is like a text
editor on steroids. We can write and edit code *and* make use of additional features that
enhance our coding experience. Visual Studio offers
code completion hints, debugging, and even it's own compiler. We'll be using it throughout
this course, so it's time to get familiar with some of the basics.
Visual Studio (VS) is an **integrated development environment (IDE)**.
An IDE is like a text editor on steroids.
We can write and edit code *and* make use of additional features that enhance our coding experience.
VS offers code completion hints, debugging, and even it's own compiler.

We'll be using it throughout this course, so it's time to get familiar with some of the basics.

.. admonition:: Note

Visual Studio IDE is not the same application as the text editor called Visual Studio Code.
If you already have VS Code installed on your machine, you will still need to
install and configure Visual Studio.
Visual Studio IDE is *not* the same application as the source-code editor called Visual Studio Code (VS Code).
If you already have VS Code installed on your machine, you will still need to install and configure VS.


.. _dotnet-intro:

.. index:: ! .NET Core, ! Software Development Kit, ! SDK
.. index:: ! .NET, ! Software Development Kit, ! SDK

Development Frameworks
----------------------

.NET Core
---------
.NET
^^^^

**.NET Core** is a set of tools for developing software in a number of different programming languages, including C#.
**.NET** is a set of tools for developing software in a number of different programming languages, including C#.
The tools together make what is known as a **software development kit**, or **SDK**.
Unlike it's predecessor, just called .NET or .NET Framework, .NET Core is open-source and available on several
operating systems. The SDK provides the runtime environment and the virtual machine for compiling
and running C# programs.

Starting with .NET 5, in November of 2020, the terms *Core and Framework* have been deprecated. There is now just one
version of .NET that is based on .NET Core.
Some of its featuers:

* Open-source and available on several operating systems.
* The SDK provides the runtime environment and the virtual machine for compiling and running C# programs.
* Contains the **base class libraries** which include the built-in code that takes care of common programming items, such as object types.
* Able to be extended using additional frameworks such as ASP.NET.

You can learn more about .NET `here <https://dotnet.microsoft.com/en-us/learn/dotnet/what-is-dotnet>`_.

.NET Core also notably contains the base class libraries. This is the built-in code that takes care of common programming items,
such as object types.
ASP.NET Core
^^^^^^^^^^^^

As we progress through this portion of the course, we will start creating web projects.
.NET will compile C#, but does not contain any libraries for web development.
ASP.NET Core is an open source collection of libraries specifically for web development and creating dynamic web applications.

We will use ASP.NET Core midway through this course; however, you can to learn more about this framework at `this <https://dotnet.microsoft.com/en-us/learn/aspnet/what-is-aspnet-core>`_ site.

.. _compiling-csharp:

A summary of the relationship between the code you write in C# and tools provided by .NET Core:
C# and the Frameworks
---------------------

A summary of the relationship between the code you write in C# and tools provided by .NET:

#. We write code in C#.
#. The source code is compiled (like translating) into another intermediate language.
#. The intermediate code is read by a runtime program included in the .NET SDK.
#. The runtime environment translates the intermediate code into machine-readable language.

Fortunately for us, .NET Core can be installed along with Visual Studio IDE.
Fortunately for us, .NET can be installed along with Visual Studio IDE.

Windows Users vs. Mac Users
---------------------------
Expand All @@ -73,17 +88,18 @@ Check Your Understanding
------------------------

.. admonition:: Question

True/False: .NET Core is the MacOS version of .NET Framework
Visual Studio is a framework.

#. True
#. False

.. ans: False, while .NET Core can operate in MacOS, it is not specific to that operating system
.. ans: False, Visual Studio is an IDE. The .NET and ASP.NET Core are frameworks that we use inside Visual Studio.
.. admonition:: Question

.NET Core contains:
.NET contains:
(Select all that apply)

#. A C# compiler
#. A virtual machine
Expand Down
5 changes: 3 additions & 2 deletions src/chapters/introduction-and-setup/why-csharp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ Why Learn C#?

This course is an introduction to **C#** and the .NET framework. C# is a
programming language developed by Microsoft and used in almost all of its products.

This course is designed for learners who are already familiar with at least one
programming language. Thus, we'll move quickly through the syntax rules and
procedural basics of the language (ie, how does one write a ``for`` loop in C#? a
conditional statement?).
conditional statement? Etc.).

As you've likely heard before, once you grasp the fundamentals of programming in
one language, learning another becomes much easier. Professional software
Expand All @@ -20,6 +21,6 @@ it's wise to start learning new ones early on in your career.
Beyond the basics of programming in C#, you'll learn some key *object oriented*
concepts to enhance the capabilities of your programs. You'll also download a
program called **Visual Studio IDE** to get familiar with the tools of the C# developer.
In the final lessons of this course, you will use a C# framework called **.NET Core MVC**.
In the final lessons of this course, you will use a C# framework called **ASP.NET Core MVC**.
This framework gives us the scaffolding necessary to create *MVC* programs (another
concept we'll cover) effectively and efficiently.
Loading

0 comments on commit 6db4825

Please sign in to comment.