If Branching : If : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » If »

 

If Branching









    

/*
Learning C# 
by Jesse Liberty

Publisher: O'Reilly 
ISBN: 0596003765
*/

 using System;

 namespace Branching
 {
    public class TestBranching
    {
       static void Main()
       {
             int valueOne = 10;
             int valueTwo = 20;
             int valueThree = 30;

             Console.WriteLine("Testing valueOne against valueTwo...");
             if ( valueOne > valueTwo )
             {
                 Console.WriteLine(
                 "ValueOne: {0} larger than ValueTwo: {1}",
                 valueOne, valueTwo);
             }

             Console.WriteLine("Testing valueThree against valueTwo...");
             if ( valueThree > valueTwo )
             {
                 Console.WriteLine(
                     "ValueThree: {0} larger than ValueTwo: {1}",
                     valueThree, valueTwo);
             }   // end if

       }         // end Main
    }            // end class
 }               // end namespace

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» If