Vic-TheGreat / Csharp_workbook

A playground for C# codes & notes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Csharp_workbook

A playground for C# codes & notes

  • arithmetic operations ( +, - * , /, etc) on Char or when accessing char xters in a string will return the ASCII value (i.e numbers) of each char respectively.
Ex: string word1= "mum"; string word2 = "dad";
    for (int i = 0; i < word1.Length; i++)
      {
       var aa = word1[i];            //output: mom
       var bb = word1[i] + word2[i]; // output: 209208209
      }
  • You cannot access/do anything with a null object. Hence, take precaution, initialize! Ex, string.Empty for strings & int = 0.

  • StringBuilder 'append' to add to strings instead of writing to the console. This is more efficient.

  • [ ]

  • [ ]

About

A playground for C# codes & notes


Languages

Language:C# 100.0%