使用系统表根据存储过程名字生成ADO.NET数据库访问代码
下面的存储过程可以在查询管理器里面生成ADO.NET 存储过程调用代码,省去很多的Coding功夫。
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
ALTER PROCEDURE [dbo].[sqltoolforexcuteandadapter]
![](/Images/OutliningIndicators/None.gif)
(
![](/Images/OutliningIndicators/None.gif)
@objName nvarchar(100),--存储过程名称
![](/Images/OutliningIndicators/None.gif)
@isexcute int --是否为execute 或者是sqladapter 0是execute,1是sqladapter
![](/Images/OutliningIndicators/None.gif)
)
![](/Images/OutliningIndicators/None.gif)
AS
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
SET NOCOUNT ON
![](/Images/OutliningIndicators/None.gif)
DECLARE @parameterCount int
![](/Images/OutliningIndicators/None.gif)
DECLARE @errMsg varchar(100)
![](/Images/OutliningIndicators/None.gif)
DECLARE @parameterAt varchar(1)
![](/Images/OutliningIndicators/None.gif)
DECLARE @connName varchar(100)
![](/Images/OutliningIndicators/None.gif)
DECLARE @outputValues varchar(100)
![](/Images/OutliningIndicators/None.gif)
--Change the following variable to the name of your connection instance
![](/Images/OutliningIndicators/None.gif)
SET @connName='conn.Connection'
![](/Images/OutliningIndicators/None.gif)
SET @parameterAt=''
![](/Images/OutliningIndicators/None.gif)
SET @outputValues=''
![](/Images/OutliningIndicators/None.gif)
SELECT
![](/Images/OutliningIndicators/None.gif)
dbo.sysobjects.name AS ObjName,
![](/Images/OutliningIndicators/None.gif)
dbo.sysobjects.xtype AS ObjType,
![](/Images/OutliningIndicators/None.gif)
dbo.syscolumns.name AS ColName,
![](/Images/OutliningIndicators/None.gif)
dbo.syscolumns.colorder AS ColOrder,
![](/Images/OutliningIndicators/None.gif)
dbo.syscolumns.length AS ColLen,
![](/Images/OutliningIndicators/None.gif)
dbo.syscolumns.colstat AS ColKey,
![](/Images/OutliningIndicators/None.gif)
dbo.syscolumns.isoutparam AS ColIsOut,
![](/Images/OutliningIndicators/None.gif)
dbo.systypes.xtype
![](/Images/OutliningIndicators/None.gif)
INTO #t_obj
![](/Images/OutliningIndicators/None.gif)
FROM
![](/Images/OutliningIndicators/None.gif)
dbo.syscolumns INNER JOIN
![](/Images/OutliningIndicators/None.gif)
dbo.sysobjects ON dbo.syscolumns.id = dbo.sysobjects.id INNER JOIN
![](/Images/OutliningIndicators/None.gif)
dbo.systypes ON dbo.syscolumns.xtype = dbo.systypes.xtype
![](/Images/OutliningIndicators/None.gif)
WHERE
![](/Images/OutliningIndicators/None.gif)
(dbo.sysobjects.name = @objName)
![](/Images/OutliningIndicators/None.gif)
AND
![](/Images/OutliningIndicators/None.gif)
(dbo.systypes.status <> 1)
![](/Images/OutliningIndicators/None.gif)
ORDER BY
![](/Images/OutliningIndicators/None.gif)
dbo.sysobjects.name,
![](/Images/OutliningIndicators/None.gif)
dbo.syscolumns.colorder
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
SET @parameterCount=(SELECT count(*) FROM #t_obj)
![](/Images/OutliningIndicators/None.gif)
IF(@parameterCount<1) SET @errMsg='No Parameters/Fields found for ' + @objName
![](/Images/OutliningIndicators/None.gif)
IF(@errMsg is null)
![](/Images/OutliningIndicators/None.gif)
BEGIN
![](/Images/OutliningIndicators/None.gif)
print 'SqlConnection conn = new SqlConnection("");
![](/Images/OutliningIndicators/None.gif)
SqlCommand com = new SqlCommand("'+@objName+'", conn);'
![](/Images/OutliningIndicators/None.gif)
print 'com.CommandType = CommandType.StoredProcedure;'
![](/Images/OutliningIndicators/None.gif)
PRINT ' SqlParameter[] Parameters = new SqlParameter[' +
![](/Images/OutliningIndicators/None.gif)
cast(@parameterCount as varchar) + '];'
![](/Images/OutliningIndicators/None.gif)
PRINT ''
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
DECLARE @source_name nvarchar,
![](/Images/OutliningIndicators/None.gif)
@source_type varchar,
![](/Images/OutliningIndicators/None.gif)
@col_name nvarchar(100),
![](/Images/OutliningIndicators/None.gif)
@col_order int,
![](/Images/OutliningIndicators/None.gif)
@col_type varchar(20),
![](/Images/OutliningIndicators/None.gif)
@col_len int,
![](/Images/OutliningIndicators/None.gif)
@col_key int,
![](/Images/OutliningIndicators/None.gif)
@col_xtype int,
![](/Images/OutliningIndicators/None.gif)
@col_redef varchar(20),
![](/Images/OutliningIndicators/None.gif)
@col_isout tinyint
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
DECLARE cur CURSOR FOR
![](/Images/OutliningIndicators/None.gif)
SELECT * FROM #t_obj
![](/Images/OutliningIndicators/None.gif)
OPEN cur
![](/Images/OutliningIndicators/None.gif)
-- Perform the first fetch.
![](/Images/OutliningIndicators/None.gif)
FETCH NEXT FROM cur INTO
![](/Images/OutliningIndicators/None.gif)
@source_name,@source_type,@col_name,@col_order,@col_len,@col_key,@col_isout,@col_xtype
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
if(@source_type=N'U') SET @parameterAt='@'
![](/Images/OutliningIndicators/None.gif)
-- Check @@FETCH_STATUS to see if there are any more rows to fetch.
![](/Images/OutliningIndicators/None.gif)
WHILE @@FETCH_STATUS = 0
![](/Images/OutliningIndicators/None.gif)
BEGIN
![](/Images/OutliningIndicators/None.gif)
SET @col_redef=(SELECT CASE @col_xtype
![](/Images/OutliningIndicators/None.gif)
WHEN 34 THEN 'Image'
![](/Images/OutliningIndicators/None.gif)
WHEN 35 THEN 'Text'
![](/Images/OutliningIndicators/None.gif)
WHEN 36 THEN 'UniqueIdentifier'
![](/Images/OutliningIndicators/None.gif)
WHEN 48 THEN 'TinyInt'
![](/Images/OutliningIndicators/None.gif)
WHEN 52 THEN 'SmallInt'
![](/Images/OutliningIndicators/None.gif)
WHEN 56 THEN 'Int'
![](/Images/OutliningIndicators/None.gif)
WHEN 58 THEN 'SmallDateTime'
![](/Images/OutliningIndicators/None.gif)
WHEN 59 THEN 'Real'
![](/Images/OutliningIndicators/None.gif)
WHEN 60 THEN 'Money'
![](/Images/OutliningIndicators/None.gif)
WHEN 61 THEN 'DateTime'
![](/Images/OutliningIndicators/None.gif)
WHEN 62 THEN 'Float'
![](/Images/OutliningIndicators/None.gif)
WHEN 99 THEN 'NText'
![](/Images/OutliningIndicators/None.gif)
WHEN 104 THEN 'Bit'
![](/Images/OutliningIndicators/None.gif)
WHEN 106 THEN 'Decimal'
![](/Images/OutliningIndicators/None.gif)
WHEN 122 THEN 'SmallMoney'
![](/Images/OutliningIndicators/None.gif)
WHEN 127 THEN 'BigInt'
![](/Images/OutliningIndicators/None.gif)
WHEN 165 THEN 'VarBinary'
![](/Images/OutliningIndicators/None.gif)
WHEN 167 THEN 'VarChar'
![](/Images/OutliningIndicators/None.gif)
WHEN 173 THEN 'Binary'
![](/Images/OutliningIndicators/None.gif)
WHEN 175 THEN 'Char'
![](/Images/OutliningIndicators/None.gif)
WHEN 231 THEN 'NVarChar'
![](/Images/OutliningIndicators/None.gif)
WHEN 239 THEN 'NChar'
![](/Images/OutliningIndicators/None.gif)
ELSE '!MISSING'
![](/Images/OutliningIndicators/None.gif)
END AS C)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
--Write out the parameter
![](/Images/OutliningIndicators/None.gif)
PRINT ' Parameters[' + cast(@col_order-1 as varchar)
![](/Images/OutliningIndicators/None.gif)
+ '] = new SqlParameter("' + @parameterAt + @col_name
![](/Images/OutliningIndicators/None.gif)
+ '", SqlDbType.' + @col_redef
![](/Images/OutliningIndicators/None.gif)
+ ');'
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
--Write out the parameter direction it is output
![](/Images/OutliningIndicators/None.gif)
IF(@col_isout=1)
![](/Images/OutliningIndicators/None.gif)
BEGIN
![](/Images/OutliningIndicators/None.gif)
PRINT ' Parameters['+ cast(@col_order-1 as varchar)
![](/Images/OutliningIndicators/None.gif)
+'].Direction=ParameterDirection.Output;'
![](/Images/OutliningIndicators/None.gif)
SET @outputValues=@outputValues+' ?=Parameters['+
![](/Images/OutliningIndicators/None.gif)
cast(@col_order-1 as varchar) +'].Value;'
![](/Images/OutliningIndicators/None.gif)
END
![](/Images/OutliningIndicators/None.gif)
ELSE
![](/Images/OutliningIndicators/None.gif)
BEGIN
![](/Images/OutliningIndicators/None.gif)
--Write out the parameter value line
![](/Images/OutliningIndicators/None.gif)
PRINT ' Parameters['+ cast(@col_order-1 as varchar) + '].Value = ?;'
![](/Images/OutliningIndicators/None.gif)
END
![](/Images/OutliningIndicators/None.gif)
--If the type is a string then output the size declaration
![](/Images/OutliningIndicators/None.gif)
IF(@col_xtype=231)OR(@col_xtype=167)OR(@col_xtype=175)OR(@col_xtype=99)OR(@col_xtype=35)
![](/Images/OutliningIndicators/None.gif)
BEGIN
![](/Images/OutliningIndicators/None.gif)
PRINT ' Parameters[' + cast(@col_order-1 as varchar) +
![](/Images/OutliningIndicators/None.gif)
'].Size=' + cast(@col_len as varchar) + ';'
![](/Images/OutliningIndicators/None.gif)
END
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
-- This is executed as long as the previous fetch succeeds.
![](/Images/OutliningIndicators/None.gif)
FETCH NEXT FROM cur INTO
![](/Images/OutliningIndicators/None.gif)
@source_name,@source_type,@col_name,@col_order,
![](/Images/OutliningIndicators/None.gif)
@col_len,@col_key,@col_isout,@col_xtype
![](/Images/OutliningIndicators/None.gif)
END
![](/Images/OutliningIndicators/None.gif)
PRINT ''
![](/Images/OutliningIndicators/None.gif)
print ' com.Parameters.AddRange(Parameters);'
![](/Images/OutliningIndicators/None.gif)
if @isexcute = 0 --使用的execute方法执行sql语句
![](/Images/OutliningIndicators/None.gif)
begin
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
print 'try
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/None.gif)
conn.Open();
![](/Images/OutliningIndicators/None.gif)
com.ExecuteNonQuery();
![](/Images/OutliningIndicators/None.gif)
}
![](/Images/OutliningIndicators/None.gif)
catch (Exception ee)
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/None.gif)
throw ee;
![](/Images/OutliningIndicators/None.gif)
}
![](/Images/OutliningIndicators/None.gif)
finally
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/None.gif)
conn.Close();
![](/Images/OutliningIndicators/None.gif)
}'
![](/Images/OutliningIndicators/None.gif)
end
![](/Images/OutliningIndicators/None.gif)
else if @isexcute = 1--需要返回数据集的话使用这个
![](/Images/OutliningIndicators/None.gif)
begin
![](/Images/OutliningIndicators/None.gif)
print 'try
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/None.gif)
da.Fill(ds);
![](/Images/OutliningIndicators/None.gif)
}
![](/Images/OutliningIndicators/None.gif)
catch (Exception ee)
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/None.gif)
throw ee;
![](/Images/OutliningIndicators/None.gif)
}
![](/Images/OutliningIndicators/None.gif)
finally
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/None.gif)
//do what you want to do or dispose resoures.
![](/Images/OutliningIndicators/None.gif)
}'
![](/Images/OutliningIndicators/None.gif)
end
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
CLOSE cur
![](/Images/OutliningIndicators/None.gif)
DEALLOCATE cur
![](/Images/OutliningIndicators/None.gif)
END
![](/Images/OutliningIndicators/None.gif)
if(LEN(@errMsg)>0) PRINT @errMsg
![](/Images/OutliningIndicators/None.gif)
DROP TABLE #t_obj
![](/Images/OutliningIndicators/None.gif)
SET NOCOUNT ON
测试代码:
sqltoolforexcuteandadapter 'YourProcName',1--or 0
显示出啦的结果是:
SqlConnection conn = new SqlConnection("");
![](/Images/OutliningIndicators/None.gif)
SqlCommand com = new SqlCommand("YourProcName", conn);
com.CommandType = CommandType.StoredProcedure;
SqlParameter[] Parameters = new SqlParameter[1];
Parameters[0] = new SqlParameter("@yourparam", SqlDbType.VarChar);
Parameters[0].Value = ?;
Parameters[0].Size=6;
com.Parameters.AddRange(Parameters);
try
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/InBlock.gif)
da.Fill(ds);
![](/Images/OutliningIndicators/InBlock.gif)
}
![](/Images/OutliningIndicators/None.gif)
catch (Exception ee)
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/InBlock.gif)
throw ee;
![](/Images/OutliningIndicators/InBlock.gif)
}
![](/Images/OutliningIndicators/None.gif)
finally
![](/Images/OutliningIndicators/None.gif)
{
![](/Images/OutliningIndicators/InBlock.gif)
//do what you want to do or dispose resoures.
![](/Images/OutliningIndicators/InBlock.gif)
}
这样非常方便,而且不用以后手写非常多的参数了,参数指定了精确的长度和类型,速度更快。
参考自codeproject
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
测试代码:
![](/Images/OutliningIndicators/None.gif)
显示出啦的结果是:
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
这样非常方便,而且不用以后手写非常多的参数了,参数指定了精确的长度和类型,速度更快。
参考自codeproject