Second Class - Intro to Git & C#
Code Files From Tonight
Project: https://github.com/chris-brickhouse/PALProgamming/tree/master
Main Program (Program.cs): https://github.com/chris-brickhouse/PALProgamming/blob/master/Program.cs
Questions? cbrickhouse@gmail.com
Summary:
Tonight we got started with C#!
- GitHub / Git
- What is Git?
- Setting up new repositories
- Connecting to repository with Visual Studio
- Visual Studio
- What is Visual Studio?
- creating new projects
- connecting with GitHub
- a walk through the tools, options and settings of VS
- Compiling - what is it, what does it do, where do the files get generated?
- Writing Code
- Explaining console apps, Program.cs, Main() function
- syntax for comments (//)
- What is the structure of an console application, namespace, classes, etc
- Our first line of code: "Hello World"
- creating our first string variable and outputting it
- 99 bottles exercise - loops 99 times counting down to one, outputs the number of bottles in each iteration
- displays how to use for loops
- also uses if statement to begin understanding control flow
- Do we have arguments? if so, show them to user.
- introduce try/catch statement for graceful error handling, output error to console
- Accepting using input
- string concatenation and interpolation
- reversing strings using indexof (where is this letter in this string)? and split (cut the string into pieces)
- replace occurrences of substring within string - replace space with zero and outputting it.
Next time we will finish SQL and move onto C#. Some C# reading: https://www.codecademy.com/learn/learn-c-sharp
Prerequisite Information
Here's the needed software list again if anyone isn't set up
For Mac you might need to run Windows virtually or follow this guide to install SQL Server: https://database.guide/how-to-install-sql-server-on-a-mac/
Needed software (all free to download and cross-platform)
- Visual Studio 2019 Community Edition - https://visualstudio.microsoft.com/downloads/
- SQL Server Developer Edition - https://www.microsoft.com/en-us/sql-server/sql-server-downloads - be sure to install all developer tools. after install, make sure you have SQL Server Tools --> SQL Management Studio installed
- Git - https://git-scm.com/downloads - this is for versioning
- GitHub account - https://github.com/ - sign up for this - we will be storing our code here. this and Git combined allow you to have version control so you can view old versions, compare, etc.
- Zoom - download/make an account https://zoom.us/
If you have any questions or concerns about installing any of these let me know.
This is the Material we are going to cover, and some references to get you started:
- Microsoft SQL - This is a database platform (similar to MS Access but more complex and server-based) and language to query said data. https://www.sqlservertutorial.net/getting-started/
- C# - This is a Microsoft language, free and open-source - reference guide
- https://docs.microsoft.com/en-us/dotnet/csharp/
- Entity Framework - this is the portion of C# that allows the language to speak to SQL more easily
- https://docs.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=netcore-cli
- HTML - this is the formatting language websites are composed of.
- https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started
- CSS - this styles (color, appearance) the HTML components you learned about in the HTML class.
- https://developer.mozilla.org/en-US/docs/Learn/CSS/First_steps/Getting_started
- JavaScript - this ties HTML and CSS together and allows you to start building interactive websites.
- https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics