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







你可能感興趣的文章

[C#] .net framework 使用 Autofac 註冊多組資料庫連線

[C#] .net framework 使用 Autofac 註冊多組資料庫連線

筆記:覺得 JavaScript function 很有趣的我是不是很奇怪

筆記:覺得 JavaScript function 很有趣的我是不是很奇怪

系列文介紹 & 版權聲明

系列文介紹 & 版權聲明






留言討論