南沙做网站要多少钱,电子商务网站开发分几个模块,如何制作一个简单的网页链接,海原县建设局网站第一个c#程序 /*
c#在编译时首先编译为通用中间语言#xff08;IL代码#xff09;#xff0c;并且将其存在程序集中
c#的程序集包括扩展名为.exe的可执行文件和扩展名为.dll的可供其他程序调用的库文件c#在执行时首先将程序集加载到CLR中#xff0c;然后通过即时编译器编译…第一个c#程序 /*
c#在编译时首先编译为通用中间语言IL代码并且将其存在程序集中
c#的程序集包括扩展名为.exe的可执行文件和扩展名为.dll的可供其他程序调用的库文件c#在执行时首先将程序集加载到CLR中然后通过即时编译器编译为本机代码*/namespace ConsoleApp1 //命名空间c#通过命名空间的概念来组织文件在引用函数需要首先使用using 导入命名空间
{//internal class Program //internal 访问修饰符只有该文件可以访问{static void Main(string[] args){Console.WriteLine(Hello, World!); //控制台输出Console.WriteLine(Console.ReadLine());//等待用户输入并且打印Console.WriteLine(Console.Read());}}
}c#输出
using System;
/*c#的输入输出函数都是在System这个类中所以必须声明 using System*/ namespace ConsoleApp2
{internal class Program{/*Console.WriteLine()主要是输出时默认会换行Console.Write()是输出不会换行且必须带有一个参数*/static void Main(string[] args){Console.WriteLine(你好);Console.WriteLine(************ );Console.Write(你好); //这个没有换行会和下一行一起输出Console.WriteLine(hello);string name 李明; //定义一个字符串int age 19; char sex 男;Console.WriteLine(姓名{0}\t 年纪{1}\t 性别{2}\t,name,age,sex);//输出数组object[] i { 0, 1, 2 }; //定义一个数组Console.WriteLine(a:{0},b:{1},c:{2}, i);char[] c { a, b, c, d };Console.WriteLine(c, 1, 3); //输出1-4的元素}}
}c#输入
namespace ConsoleApp3
{/*Console.ReadKey() 监听键盘按键可以理解为按任意键执行Console.Read() 读取键盘输入的一个字符返回ASCII值回车退出Console.ReadLine() 读取所有字符返回字符串*/internal class Program{static void Main(string[] args){//定义一个字符串来接受键盘输入string str1Console.ReadLine();Console.WriteLine(readline接受的字符串{0},str1);//Console.Read()接受一个int数int read Console.Read();Console.WriteLine(Console Read接受的字符ascii{0},read);//类型转换string str2 Convert.ToString(read);Console.WriteLine(Console Read接受的字符{0}, str2);//将ascii转换为字符串char aConvert.ToChar(read);Console.WriteLine(ascii转换为{0}, a);}}
}