- 0
- 0
- 约1.25千字
- 约 20页
- 2017-04-27 发布于四川
- 举报
4.1.命名空间、类型转换及枚举、结构、Array、DateTime
using System;
using System.Collections.Generic;
using System.Text;
namespace HelloWorld
{
class Program
{
static void Main(string[ ] args)
{
//…
}
}
};using System; //引用 System 命名空间
namespace HelloWorld
{
class Program
{
static void Main(string[ ] args)
{
Console.WriteLine(Hello .NET);
}
}
};自定义命名空间;嵌套命名空间;使用别名;常量在使用过程中值不会发生变化
常量程序中反复使用;编译器要确切地知道数据的类型;隐式转换:自动类型转换;static void Main(string[ ] args)
{
double score = 58.5; // 原始成绩
i
原创力文档

文档评论(0)