Demonstate automatic conversion from long to double : long « Data Types « C# / C Sharp






Demonstate automatic conversion from long to double

Demonstate automatic conversion from long to double
  
/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/
// Demonstate automatic conversion from long to double. 
 
using System; 
 
public class LtoD {    
  public static void Main() {    
    long L; 
    double D; 
   
    L = 100123285L; 
    D = L; 
   
    Console.WriteLine("L and D: " + L + " " + D); 
  }    
}


           
         
    
  








Related examples in the same category

1.Compute the distance from the Earth to the sun, in inches. Compute the distance from the Earth to the sun, in inches.
2.Unsigned long value
3.Convert long value to KB,MB,GB,TB
4.Display value using the standard format specifiers for ulong value