Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
AnswerRe: Data types Pin
Dave Kreskowiak15-Sep-07 3:21
mveDave Kreskowiak15-Sep-07 3:21 
GeneralRe: Data types Pin
jon-8015-Sep-07 3:24
professionaljon-8015-Sep-07 3:24 
JokeRe: Data types Pin
Paul Conrad15-Sep-07 4:00
professionalPaul Conrad15-Sep-07 4:00 
GeneralRe: Data types Pin
jon-8015-Sep-07 4:16
professionaljon-8015-Sep-07 4:16 
GeneralRe: Data types Pin
Dave Kreskowiak15-Sep-07 6:01
mveDave Kreskowiak15-Sep-07 6:01 
GeneralRe: Data types Pin
jon-8015-Sep-07 6:29
professionaljon-8015-Sep-07 6:29 
GeneralRe: Data types Pin
Dave Kreskowiak15-Sep-07 6:41
mveDave Kreskowiak15-Sep-07 6:41 
GeneralRe: Data types Pin
jon-8016-Sep-07 1:36
professionaljon-8016-Sep-07 1:36 
I found an article which, in summary indicates that exponentials are calculated as the product of the value and base (usually 10) raised to the power of the exponential value.

So for example,

This is the Float value types
-------------------
The maximum value of float is : 3.402823E+38

This is equal to 3.402823 * (10 ^ 38)

The minimum value of float is : -3.402823E+38
The date is: 16/09/2007 09:01:59

This is equal to -3.402823 * (10 ^ 38)

Source: http://articles.techrepublic.com.com/5100-3513_11-6136763.html

The author refers to the minimum value of float as "approximately 1.5 times 10 to the 45th power", the resultant value (1.e+46) seems to disagree with the value given by the MinValue method.

Quite a good revision for math Smile | :)

--------------------------------------------------------------------------------------
Code for displaying min and max values and writing output to a text file
--------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace TestConsole2
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create an instance of StreamWriter to write text to a file.
            // The using statement also closes the StreamWriter.
 // Default path: C:\Documents and Settings\< windows user>\My Documents\Visual Studio 2005\Projects\<Name of Solution>\<Name of project>\bin\<Debug || Release>
            using (StreamWriter sw = new StreamWriter("Output.txt"))
            {
                // Add some text to the file.
                sw.Write("This is the ");
                sw.WriteLine("Float value types");
                sw.WriteLine("-------------------");
                sw.WriteLine("The maximum value of float is : " + float.MaxValue);
                sw.WriteLine("The minimum value of float is : " + float.MinValue);
                // Arbitrary objects can also be written to the file.
                sw.Write("The date is: ");
                sw.WriteLine(DateTime.Now);
            }
            //Source: MSDN
         
        }
    }
}


Jon

GeneralRe: Data types Pin
Dave Kreskowiak16-Sep-07 1:50
mveDave Kreskowiak16-Sep-07 1:50 
GeneralRe: Data types Pin
jon-8016-Sep-07 2:03
professionaljon-8016-Sep-07 2:03 
GeneralRe: Data types Pin
jon-8015-Sep-07 6:37
professionaljon-8015-Sep-07 6:37 
AnswerRe: Data types Pin
DavidNohejl15-Sep-07 4:39
DavidNohejl15-Sep-07 4:39 
GeneralRe: Data types Pin
Colin Angus Mackay15-Sep-07 14:40
Colin Angus Mackay15-Sep-07 14:40 
QuestionReflection and Generics (List) [modified] Pin
Vertyg015-Sep-07 2:31
Vertyg015-Sep-07 2:31 
AnswerRe: Reflection and Generics (List) Pin
Guffa15-Sep-07 3:03
Guffa15-Sep-07 3:03 
GeneralRe: Reflection and Generics (List) Pin
Vertyg015-Sep-07 3:05
Vertyg015-Sep-07 3:05 
GeneralRe: Reflection and Generics (List) Pin
Giorgi Dalakishvili15-Sep-07 3:25
mentorGiorgi Dalakishvili15-Sep-07 3:25 
GeneralRe: Reflection and Generics (List) Pin
Guffa15-Sep-07 5:51
Guffa15-Sep-07 5:51 
AnswerRe: Reflection and Generics (List) Pin
Giorgi Dalakishvili15-Sep-07 4:03
mentorGiorgi Dalakishvili15-Sep-07 4:03 
GeneralRe: Reflection and Generics (List) Pin
Vertyg015-Sep-07 4:23
Vertyg015-Sep-07 4:23 
GeneralRe: Reflection and Generics (List) Pin
Giorgi Dalakishvili15-Sep-07 4:34
mentorGiorgi Dalakishvili15-Sep-07 4:34 
GeneralRe: Reflection and Generics (List) Pin
Vertyg015-Sep-07 4:44
Vertyg015-Sep-07 4:44 
GeneralRe: Reflection and Generics (List) Pin
Giorgi Dalakishvili15-Sep-07 5:02
mentorGiorgi Dalakishvili15-Sep-07 5:02 
GeneralRe: Reflection and Generics (List) Pin
Vertyg015-Sep-07 4:59
Vertyg015-Sep-07 4:59 
GeneralRe: Reflection and Generics (List) Pin
Giorgi Dalakishvili15-Sep-07 5:03
mentorGiorgi Dalakishvili15-Sep-07 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.