C# 指定格式的字符串截成一维数组(二维数组)的操作类

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 17:42   1658   0

using System;
using System.Text;
namespace
myClass
{
class
clsArrayList
{
public int p_Count=-1; //数据组数

private string[] myArray1; //一维矩阵
private string[,] myArray2; //二维矩阵
/// <summary>
/// 一维字符串分隔,初始化.例: clsArrayList myArray1List=new clsArrayList("1;2;3;4;5",';')
/// </summary>

/// <param name="strStringSource"></param>
/// <remarks>gx 2010-04-25</remarks>
public clsArrayList(string strStringSource, char charSepartor)
{
try

{
myArray1
= strStringSource.Split(charSepartor);//截取
p_Count = myArray1.Length;
}
catch
(Exception ex)
{
myClass.clsLogHelper.m_CreateErrorLogTxt(
"clsArrayList(" + strStringSource + " , " + charSepartor + ")"

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛