本文共 1861 字,大约阅读时间需要 6 分钟。
c# 命名空间命名规范
Correct answer: 1In C#.Net, "using" statement is used to import the namespace in our program
In the given statement, 1st statement is correct.
正确答案:1 在C#.Net中,“ using”语句用于在我们的程序中导入名称空间
在给定的语句中,第一个语句是正确的。
Correct answer: 2Add reference of the library and include namespace into the project and then we can use classes present in the namespace.
In the given statement, the 2nd statement is correct.
正确答案:2 添加库的引用,并将命名空间包含到项目中,然后我们可以使用命名空间中存在的类。
在给定的语句中,第二条语句正确。
Correct answer: 1Yes
Yes, we can use multiple using statements in a program.
正确答案:1 是
是的,我们可以在一个程序中使用多个using语句。
using System;namespace my_namespace{ class sample { public static void sayHello() { Console.WriteLine("Hello"); } } class program { static void Main(string[] args) { sample.sayHello(); } }}
Correct answer: 2Hello
The above code will print "Hello" on console screen.
正确答案:2 你好
上面的代码将在控制台屏幕上打印“ Hello” 。
Correct answer: 3Any number of classes
We can create any number of classes in a namespace.
正确答案:3 任意数量的班级
我们可以在名称空间中创建任意数量的类。
翻译自:
c# 命名空间命名规范
转载地址:http://sdtzd.baihongyu.com/