摘要:
class Program { static void Main(string[] args) { string str = string.Format("我叫{0},来自{1},现居住在{2}", "小明","上海","重庆"); Console.WriteLine(str); int age = 阅读全文
posted @ 2020-09-16 15:44
___lucky
阅读(80)
评论(0)
推荐(0)
摘要:
namespace Demo07_字符串处理2 { class Program { static void Main(string[] args) { char[] ch = { ' ', 'a', 'B', 'g' }; string str = "abcdefg"; Console.WriteL 阅读全文
posted @ 2020-09-16 15:01
___lucky
阅读(90)
评论(0)
推荐(0)
摘要:
namespace String01 { class Program { static void Main(string[] args) { char[] ch1 = { 'a', 'B', 'F' }; string str = "aBcDeFg"; Console.WriteLine(str.T 阅读全文
posted @ 2020-09-16 14:57
___lucky
阅读(63)
评论(0)
推荐(0)
摘要:
namespace Demo05_reverse { class Program { static void Main(string[] args) { float f = 55.5f; //只要是小数就默认为double类型,数字后加f为显式转换,将double转换为float double d 阅读全文
posted @ 2020-09-16 11:39
___lucky
阅读(208)
评论(0)
推荐(0)
摘要:
namespace Demo04 { class Program { static void Main(string[] args) { double d = 123.456; //数字格式说明符 Console.WriteLine("{0:c}",d); //货币符号 Console.WriteL 阅读全文
posted @ 2020-09-16 11:33
___lucky
阅读(281)
评论(0)
推荐(0)
摘要:
namespace Demo03 { class Program { static void Main(string[] args) { /* string str = string.Format("我叫小明,今年22岁,来自上海。"); Console.WriteLine(str); Consol 阅读全文
posted @ 2020-09-16 11:29
___lucky
阅读(208)
评论(0)
推荐(0)
摘要:
namespace Demo02 { class Program { static void Main(string[] args) { /* int age = 18; int x = 1, y = 2, z; z = x + y; Console.WriteLine(z); Console.Re 阅读全文
posted @ 2020-09-16 11:28
___lucky
阅读(129)
评论(0)
推荐(0)
摘要:
namespace HelloWorld { class Program //class是类的修饰符 { //程序的入口 static void Main(string[] args) { Console.WriteLine("Hello World!"); Console.ReadKey(); } 阅读全文
posted @ 2020-09-16 11:21
___lucky
阅读(92)
评论(0)
推荐(0)
浙公网安备 33010602011771号