指令如下:
#region Using Directives
using System;
using System.Data; //Use ADO.net namespace
using System.Data.SqlClint;// Use SQL data provider namespace
using System.Collections.Genetic;
Using system.Text;
#endregion
这些代码添加在哪里
#region Using Directives
using System;
using System.Data; //Use ADO.net namespace
using System.Data.SqlClint;// Use SQL data provider namespace
using System.Collections.Genetic;
Using system.Text;
#endregion
这些代码添加在哪里
解决方案 »
- 如何让数据库空表在客户端建立
- C# 调用C++写的OCX控件出现HRESULT:0x8000FFFF
- 浏览器右键菜单启动自己写的程序中的种种问题
- c# 修改连接的数据库服务器语句,代码
- vb.net中collection如何转换到C#
- 一个菜鸟问题:如何创建折分的窗体,类似网页的Frameset
- 如何获得上个月的第一天河最后一天,然后更新DateTimePicker值
- winform中如何添加一个视频或音频,请大大们帮忙!小弟在线等
- C#中AxWebBrowser内嵌WORD为什么保存和提取有问题,付源码,请帮忙给看看!!
- 怎样把数据库操作的语句用一个xml文件来保存
- GridView1重新帮定数据,如何定义DataSourceID
- XmlElement itemElement = (XmlElement)itemNode中的括号是什么意思?
using System;
using System.Data; //Use ADO.net namespace
using System.Data.SqlClint;// Use SQL data provider namespace
using System.Collections.Genetic;
Using system.Text; namespace CloseThreadBack
{ class Form1:Form
{
............
}
}
我也是想问这个问题的,结果看了上面的回答,太让我郁闷了。人家不明白的是#region Using Directives
的意思。回答问题前先动动脑筋,难道别人连using namespacename 这样一来的指令也不知道吗?using namespacename在每本基础教程上都有,人家会不明白吗?在其他地方找了个答案如下:ms-help://MS.NETFrameworkSDKv1.1.CHS/csref/html/vcerrRegion.htm
#region 使您得以在使用 Visual Studio 代码编辑器的大纲显示功能时指定可展开或折叠的代码块。
#region name
其中:
name
希望给予将出现在 Visual Studio 代码编辑器中的区域的名称。
备注
必须用 #endregion 指令终止 #region 块。
#region 块不能与 #if 块重叠。但是,可以将 #region 块嵌套在 #if 块内,并且可以将 #if 块嵌套在 #region 块内。
示例
// preprocessor_region.cs
#region MyClass definition
public class MyClass
{
public static void Main()
{
}
}
#endregion
#if
#else
#elif
#endif
#define
#undef
#warning
#error
#line
#region
#endregion
虽然编译器没有单独的预处理器,但在处理该节中描述的指令时如同存在一个单独的预处理器;这些指令用于辅助条件编译。与 C 和 C++ 指令不同,不能使用这些指令创建宏。
预处理器指令必须是行上的唯一指令。
ms-help://MS.NETFrameworkSDKv1.1.CHS/csref/html/vclrfpreprocessordirectives.htm