`

Ch02 ConstTest

    博客分类:
  • C#
阅读更多
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConstTest
{
    class Program
    {
        public const double piL = 3.14; // 定义 静态常量
        static void Main(string[] args)
        {
            const double piH = 3.14159265; // 定义 静态常量
            //piH = 3.15;
            Console.WriteLine("piL={0}", piL);
            Console.WriteLine("piH={0}", piH);
            Console.ReadKey();
        }
        
    }
}


诚品服饰 英伦男装 无条件退换
分享到:
评论

相关推荐

    C++_STL_示例

    string strText("This is a test"); //在strText的末尾附加一个字符串"!" strText.append("!"); //at()返回字符串在指定索引处的字符的引用 //如果给定的索引值超出了字符串的有效长度,则抛出out_of_range...

    canvas-heightmap:画布高度图生成器

    快速开始安装npm install canvas-heightmap用const ch = new CanvasHeightmap ( ) ;// At first set the source and wait until it would be loaded.ch . use ( '...

    Flutterwave-node-v3:Flutterwave v3 API的官方NodeJS库

    const Flutterwave = require ( 'flutterwave-node-v3' ) ; const flw = new Flutterwave ( PUBLIC_KEY , SECRET_KEY ) ; 对于登台,请使用TEST API密钥;对于生产,请使用LIVE API密钥。 您可以从Flutterwave仪表...

    From C to C++

    const int N=200; void strUpper(char *s); void strLower(char *s); int main(){ char ms[N]; cout; cin.getline(ms,N); strUpper(ms); cout; strLower(ms); cout; return 0; } void strUpper(char *s) ...

    语言程序设计课后习题答案

    Program, _lock, test2, A_B_C_D是合法的标识符,其它的不是。 2-3 例2.1中每条语句的作用是什么? #include void main(void) { cout!\n"; cout!\n"; } 解: #include <iostream.h> //指示编译器将文件iostream...

    C语言函数及相关知识

    用 法: void assert(int test); 程序例: #include #include #include struct ITEM { int key; int value; }; /* add item to list, make sure list is not null */ void additem(struct ITEM *itemptr) { ...

    uCOS-II v2.52 在 STM32 上的移植

    5.Modify function name "LCD_test()" to "LCD_Test()". 2010-08-06: Comment off "typedef enum {FALSE = 0, TRUE = !FALSE} bool;" in stm32f10x.type.h in order to avoid warning. 2010-08-09: Prepare ...

    c++ 面试题 总结

    如果const位于星号的左侧,则const就是用来修饰指针所指向的变量,即指针指向为常量; 如果const位于星号的右侧,const就是修饰指针本身,即指针本身是常量。 (1)const char *p 一个指向char类型的const对象指针,...

    Bochs - The cross platform IA-32 (x86) emulator

    - Updated Bochs TESTFORM to version 0.5 - SF patches applied [2864402] outstanding x2apic patches by Stanislav [2960379] Fix build with -Wformat -Werror=format-security by Per Oyvind Karlsen ...

    C# for CSDN 乱七八糟的看不懂

    C#关键字 关键字 abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach ...

Global site tag (gtag.js) - Google Analytics