- Visual Studio Code installing and configuring the C# extension
- Steps to create the solution
- C# Topics
- Git Commands
- vi Text Editor Commands
-
Installing .NET Core SDK
-
Downloading the Visual Studio Code
-
Install the C# extension: C# for Visual Studio Code (powered by OmniSharp)
-
Install the extension: vscode-nuget-package-manager (NuGet Package Manager powered by jmrog)
-
Install the extension: C# XML Documentation Comments (powered by Keisuke Kato)
-
Install the extension: C# Extensions (powered by jchannon)
-
Install the Git: https://git-scm.com/download/win
-
Shortcuts
- Ctrl+Shift+D: Debug
- Ctrl+Shift+F: Code indentation
- Ctrl+Shift+P: Open the show all commands, it is usefull to install nuget packages
- ///: Comments
- Keyboard shortcuts for windows
- Create the folder CSharpClass
- Open the folder local
- Run the "dotnet new sln" command
- This command creates the solution file
- Create the project folder ClassNumber01_Types
- Open the project folder
- Run the "dotnet new console" command
- This command creates the console application
- Return to the CSharpClass folder
- Run the "dotnet sln .\CSharpClass.sln add .\ClassNumber01_Types\ClassNumber01_Types.csproj" command
- This command attach the project to the solution
- Adding a project reference
-
https://docs.microsoft.com/pt-br/dotnet/core/tools/dotnet-add-reference
-
Examples:
C:\Repositories\GitHub\c-sharp-class\src\CSharpClass\ClassNumber06_OOP> dotnet add reference ..\ClassNumber05_OOP\ClassNumber05_OOP.csproj
or
C:\Repositories\GitHub\c-sharp-class\src\CSharpClass> dotnet add .\ClassNumber06_OOP\ClassNumber06_OOP.csproj reference .\ClassNumber05_OOP\ClassNumber05_OOP.csproj
-
- Compiled and interpreted languages and Dynamic Link Libraries
- Console application
- Program class, Main method and args
- Namespace, class and method scope
- using namespaces
- using #region and #endregion
- Console.ReadLine
- Console.WriteLine
- Program class, Main method and args
- Types
- int or Int32
- string or String
- long or Int64
- boolean
- decimal or Decimal
- double or Double
- byte
- char or Char
- Guid
- Casting
- Explicit and implicit
- Converters
- Parse methods
- Converter class
- Arrays
- String
- string format
- StringBuilder
- Keywords
- checked (curiosity)
- var
- const
- readonly
- Managing Program Flow
- If, else if and else
- Ternary operator
- Switch
- Loops
- for
- while
- do while
- foreach
- keywords
- break
- continue
- goto
- Object Oriented Programming
- Constructor
- Properties
- Destructor
- Inheritance
- Overload
- Override and virtual
- Modifiers
- public
- private
- protected
- abstract
- internal
- static
- partial
- Interfaces
- IComparable and IComparer
- IEquatable
- GetHashCode method
- Equals method
- IEqualityComparer
- IDisposable
- using keyword
- Garbage Collector
- Collections
- List
- Dictionary
- ArrayList
- HashSet
- HashTable
- Stack
- Queue
- SortedList
- Enums
- Serialization and Deserialization
- XML
- JSON
- Generics
- Exceptions
- try
- catch
- finally
- ADO
- ORM
- EntityFramework
- Code First
- Migration
- Attributes
- EntityFramework
- Ref and out parameters (next)
- Linq
- join
- order by ascending and descending
- group by
- let keyword
- Anonymous
- Parallel Linq
- ForAll method
- Linq to Xml
- Lambda
- GroupBy
- Sum
- Average
- Max and Min
- Join
- Where
- Skip
- Take
- Intersect
- Except
- DefaultIfEmpty
- FirstOrDefault
- SingleOrDefault
- ForEach method
- OrderBy And OrderByDescending
- IO
- StreamReader
- StreamWriter
- StringReader
- StringWriter
- Path
- File
- DirectoryInfo
- FileInfo
- Extension methods
- Actions and functions
- Multithreading
- Task
- Async methods
- Reflection
git init
: initialize the local git repositorygit config --list
: list the configurationgit config user.name "My User Name"
: change the local user namegit config user.email
[email protected]
: change the local e-mailgit add <file or folder>
: stage a filegit add .
: stage all the filesgit status
: list the staged and not staged filesgit rm --cache <file>
: remove the file from the stagegit log
: show the commitsgit log --oneline
: show the commits in one linegit commit -m "Your commit message"
: create a commitgit commit -m "Your commit message" --amend
: update the last commit messagegit branch -a
: list all branchesgit branch <branch name>
: create branchgit checkout <branch name>
: switch branchgit checkout -b <branch name>
: create and switch branchgit merge <branch name>
: merge branchgit remote add origin <repository url>
: configure the repositorygit push -u origin <branch name>
: send the changes to the remote repository
i
: insert the textesc
: to exit from the textwq
: to write the file and exit from the vi