📄 tablehelper.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Collections;
namespace Qeb.Support.Common
{
public class TableHelper
{
/// <summary>
/// 列值转换为数组
/// </summary>
/// <param name="rows"></param>
/// <param name="colName"></param>
/// <returns></returns>
public static string[] ColValueToArray(DataRow[] rows,string colName)
{
ArrayList myList = new ArrayList();
foreach(DataRow dr in rows)
{
myList.Add(dr[colName].ToString());
}
return (string[])myList.ToArray(typeof(string));
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -