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

Tuesday, September 3, 2019

Codecademy Out 4/7


// Sample Solution
using System;

namespace OutParameters
{
  class Program
  {
    static void Main(string[] args)
    {
      string ageAsString = "102";
      string nameAsString = "Granny";
      int ageAsInt;
      bool outcome;
      outcome = Int32.TryParse(ageAsString, out ageAsInt);
      Console.WriteLine(outcome);
      Console.WriteLine(ageAsInt);
      int nameAsInt;
      bool outcome2;
      outcome2 = Int32.TryParse(nameAsString, out nameAsInt);
      Console.WriteLine(outcome2);
      Console.WriteLine(nameAsInt);
    }   
  }
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts