• λ我爱Aspx >> Asp.Net >> Beginner with c# 4
  • Beginner with c# 4

  • :未知  Դ:internet  :2007-5-5 19:46:03  ؼ:c#
  • ulong val3 = 56L;

    ulong val4 = 78UL;

    float Single-precision floating point type float value = 1.23F;

    double Double-precision floating point type double val1 = 1.23

    double val2 = 4.56D;

    bool Boolean type; a bool value is either bool value = true;

    true or false

    char Character type; a char value is a Unicode char value = 'h';

    character

    decimal Precise decimal type with 28 significant digits decimal value = 1.23M;

    ÄãÒ²¿ÉÒÔ×Ô¶¨Òå×Ô¼ºµÄÔ¤¶¨ÒåÀàÐÍ£¬¿ÉÒÔÕâÑù£º*/

    using System;

    struct Digit

    {...}

    class Test

    {

    static void TestInt() {

    int a = 1;

    int b = 2;

    int c = a + b;

    Console.WriteLine(c);

    }

    static void TestDigit() {

    Digit a = (Digit) 1;

    Digit b = (Digit) 2;

    Digit c = a + b;

    Console.WriteLine(c);

    }

    static void Main() {

    TestInt();

    TestDigit();

    }

    }

    /*

    ÕâÒ»½ÚÓеã³ÁÃÆ¡££º£¨

    Ҷƪл˵?
  • һƪBeginner with c# 5
    һƪBeginner with c# 3