C# Dictionary用法


var periodMapping = new Dictionary<string, int>
{
    {"第1節",0},
    {"第2節",1},
    {"第3節",2},
    {"第4節",3},
    {"1OT",4},
    {"2OT",5},
    {"3OT",6},
};

前面是key後面是value
只要用periodMapping[key]就能找到value

#C# #Winform







你可能感興趣的文章

【SSH 技巧】使用 iTerm2 設定 Profile + Shell Script 自動登入 Server

【SSH 技巧】使用 iTerm2 設定 Profile + Shell Script 自動登入 Server

《鳥哥 Linux 私房菜:基礎篇》Chapter 00 - 計算機概論

《鳥哥 Linux 私房菜:基礎篇》Chapter 00 - 計算機概論

F2E合作社|popovers彈跳提示框|Bootstrap 5網頁框架開發入門

F2E合作社|popovers彈跳提示框|Bootstrap 5網頁框架開發入門






留言討論