Dictionary<int, String> loadData = new Dictionary();
// File contains a list of filenames say for ex. 5 filenames
foreach (var file in filenames)
{
// I want to assign like this
loadData[id]=file;
}
如何loadData(key,value)
在 C# 中分配,以便我可以访问loadData[5] = "hello.txt"
;