ADO.NET 的()对象用来建立应用程序与数据库的连接
A. DataSet
B. DataReader
C. Connection
D. Command
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dc-5170-c0b0-e819a112ab00.html
点击查看答案
下列的数组定义语句,不正确的是()
A. int a[]=new int[5]{1,2,3,4,5}
B. int[,]a=new inta[3][4]
C. int[][]a=new int [3][]
D. int []a={1,2,3,4}
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dd-b5a3-c0b0-e819a112ab00.html
点击查看答案
下列关于ADO.NET的特点错误的是( )
A. 在ADO.NET中,数据是以XML格式存储的,具有较好的互操作性
B. ADO.NET采用断开式数据结构,这增加了应用程序的开销
C. 在ADO.NET中,可以采用C# VB.NET等语言编写程序
D. ADO.NET的性能比基于COM的ADO好
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dc-d2b4-c0b0-e819a112ab00.html
点击查看答案
关于外键约束,下列说法正确的是()
A. 外键约束建立在主表的字段上
B. 外键约束建立在从表的字段上
C. 外键列的值不能为空
D. 外键一定要与相应的主键同名
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dd-7968-c0b0-e819a112ab00.html
点击查看答案
已知变量ds 引用某个DataSet 对象,该DataSet 对象中已包含一个表名为“table1”的数据表。在Windows 窗体Form1 中,为了将变量名为dgvData 的DataGridView 控件绑定到数据表“table1”,可以使用代码( )。【选两项】
A. dgvData.DataSource = ds;
dgvData.DataMember = ds.Tables["table1"];
B. dgvData.DataMember = ds;
C. dgvData.DataSource = new DataView(ds.Tables["table1"]);
D. dgvData.DataSource = ds.Tables["table1"];
dgvData.DataMember = ds;
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dd-d67e-c0b0-e819a112ab00.html
点击查看答案
在 C#中,()访问修饰符修饰的变量只能由当前程序集访问
A. public
B. protected
C. internal
D. private
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dd-051a-c0b0-e819a112ab00.html
点击查看答案
在设计器中将DataGridView 控件数据绑定到单个表的操作中,下列说法不正确的是( )
A. 将该控件的DataSource属性设置为包含您要绑定到的数据项的对象
B. 如果数据源是数据集,将DataMember 属性设置为要绑定到的表的名称
C. 如果数据源是数据集或基于数据集表的数据视图,需向窗体添加代码来填充数据集
D. 将该控件的DataBindings属性设置为包含您要绑定到的数据项的对象
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dd-533c-c0b0-e819a112ab00.html
点击查看答案
C#中MyClass 为一自定义类,其中有以下方法定义public void Hello(){..}使用以下语句创建了该类的对象,并使变量obj 引用该对象:MyClass obj = new MyClass();那么,可如何访问类MyClass 的Hello 方法()
A. obj.Hello();
B. obj::Hello();
C. MyClass.Hello();
D. MyClass::Hello();
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dd-9b9e-c0b0-e819a112ab00.html
点击查看答案
在ADO.NET中,下列代码运行后的输出结果是()
代码:
DataTable dt=new DataTable();
dt.Columns.Add (“编号,typeof(System.Int16)); dt.Columns.Add (“成绩,typeof(System.Single)); Console.WriteLine(dt.Columns[1].DataType);
A. System.Int16
B. System.Single
C. 编号
D. 成绩
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dd-233c-c0b0-e819a112ab00.html
点击查看答案
在.NET 中,文本框控件的( )属性用来设置其是否是只读的
A. ReadOnly
B. Locked
C. Lock
D. Style
解析:
https://www.shititong.cn/cha-kan/shiti/0001eb89-18dd-197d-c0b0-e819a112ab00.html
点击查看答案