![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#学习笔记
康小夫
这个作者很懒,什么都没留下…
展开
-
输入指令——Console.ReadLine()
static void Main(string [ ] args) { string userName; Console.WriteLine(“Enter your name:”); userName = Console.ReadLine(); Console.WriteLine(“Welcome {0}!”,userName原创 2016-09-13 22:23:23 · 6533 阅读 · 0 评论 -
输出指令——Console.WriteLine()
在Console.WriteLine()指令中,用{0},{1}......来表示需替换的变量位置,例子如下: static void Main(string[ ] args) { int myInteger; string myString; myInteger = 17; myString = " \"myInteger \原创 2016-09-13 22:02:00 · 1411 阅读 · 0 评论 -
名称空间
如果在该名称空间代码的外部使用名称空间中的名称,就必须写出该名称空间中的限定名称。 限定名称在不同的名称空间级别之间使用句点符号(.) 可以使用using语句简化名称的访问 namespace levelOne { using LeveTwo; namespace LeveTwo { //na原创 2016-09-13 22:32:52 · 148 阅读 · 0 评论