Quotes help make search much faster. Example: "Practice Makes Perfect"

Monday, September 2, 2019

Codecademy Review 6/6


// Sample Solution
using System;

namespace Review
{
  class Program
  {
    static void Main(string[] args)
    {
      /* use this space to write your own short program!
      Here's what you learned:

      DATA TYPES: int, double, char, string, bool
      VARIABLES: datatype variableName = value;
      COMMON ERRORS: wrong type, wrong value, no semicolon
      DATA TYPE CONVERSION: implicit, explicit, methods

      Good luck! */
bool someValue = true;
      string newValue = someValue.ToString();
      Console.WriteLine(newValue);
     
      char[] stringToCharArray = newValue.ToCharArray();
      foreach(char ch in stringToCharArray){
      Console.WriteLine(ch);
      }
int charIntValue = Convert.ToInt16(stringToCharArray[0]);
      Console.WriteLine(charIntValue);
    }
  }
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts