Skip to content

henriq-toledo/c-sharp-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C# Class

Table of contents

  1. Visual Studio Code installing and configuring the C# extension
  2. Steps to create the solution
  3. C# Topics
  4. Git Commands
  5. vi Text Editor Commands

Visual Studio Code installing and configuring the C# extension

Steps to create the solution

  • 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

C# Topics

  • 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
  • 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
  • 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 Commands

  • git init: initialize the local git repository
  • git config --list: list the configuration
  • git config user.name "My User Name": change the local user name
  • git config user.email myemail@mail.com: change the local e-mail
  • git add <file or folder>: stage a file
  • git add .: stage all the files
  • git status: list the staged and not staged files
  • git rm --cache <file>: remove the file from the stage
  • git log: show the commits
  • git log --oneline: show the commits in one line
  • git commit -m "Your commit message": create a commit
  • git commit -m "Your commit message" --amend: update the last commit message
  • git branch -a: list all branches
  • git branch <branch name>: create branch
  • git checkout <branch name>: switch branch
  • git checkout -b <branch name>: create and switch branch
  • git merge <branch name>: merge branch
  • git remote add origin <repository url>: configure the repository
  • git push -u origin <branch name>: send the changes to the remote repository

vi Text Editor Commands

  • i: insert the text
  • esc: to exit from the text
  • wq: to write the file and exit from the vi

About

C# Class using Visual Studio Code and .NET Core 2.2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages