0%

20180823工作日誌

紀錄一下說不定以後用的到的讀Configuration

1
2
3
4
5
6
7
8
9
var configuration = builder.Build();

Console.WriteLine("--------------------------");
var section = configuration.GetSection("Mission_EnemyData").GetChildren().Where(x => x.GetSection("Mission_ID").Value == "Mission_002");
foreach (var s in section)
{
Console.WriteLine($"Key: {s.Key,-30} || Value: {s.Value} || Path: {s.Path}");
}
Console.WriteLine("--------------------------");

在MongoDB用Set加入一個新Field在Document內

StackOverflow : How to add new fields to existing document

MongoDB C# Drive 使用方法

MongoDB Driver Quick Tour

C#算時間差距

StackOverflow : Showing Difference between two datetime values in hours