C#, C♯, C#相談室 Part52at TECH
C#, C♯, C#相談室 Part52 - 暇つぶし2ch21:デフォルトの名無しさん
09/04/04 13:49:36
いろいろ混乱してとりあえず 整理のためにこんな感じなのかなとコードを書いてみます
 
public List<int[][]> List_POS;
int a=0,b=0,c=0;
int line_count = arrText.Count;
List_POS; = new List<int[][]>();
foreach (string sOutput in arrText){
     string temp = (string)arrText[a]; // string型にキャスト
     string[] temp2 = temp.Split(',');// splitメソッドで文字列アレイにして数える
     int col_count = temp2.Length; // 列数を数えているだけ
     List_POS[a] = new List<int[][]>(col_count/2);//XYで2つ使うため一行を2で割る
     string[] temp_line = sOutput.Split(',');
     for(int i=0;i<temp_line.Length;i++){
        List_POS[a][b]=new List<int[][]>(2);
        for(int k=0;k<2;k++){
          i = i + k;
          List_POS[a][b][c]=Convert.ToInt32(temp_line[i]);
.....




次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch