- Aug 07 Sun 2022 13:58
-
世貿陸橋Bye Bye!
- Aug 04 Thu 2022 12:31
-
nameof運算式 (C# 6以上支援)
- Jul 30 Sat 2022 10:29
-
同路徑的進程(process)只能存在一個實體

網路上查到的資料大多是用Mutex
System.Threading.Mutex mutex = new System.Threading.Mutex(true, uniqueName, out bool createdNew)
https://docs.microsoft.com/zh-tw/dotnet/api/system.threading.mutex?view=net-6.0
但我在自己電腦測試並微調過幾種寫法,結果createdNew都為true,原因不明
- Jul 27 Wed 2022 23:10
-
程式簡易效能紀錄

以之前的AppLog以及字串轉列舉為例
//紀錄方法的開始(StartTrace)和結束(EndTrace)時間,再相減(TimeSpan? elapsed)表示呼叫方法所花費的時間
void Example()
{
//視情況從外部帶入,譬如當方法是被迴圈呼叫時
DateTime start = StartTrace();
- Jul 25 Mon 2022 13:38
-
in 參數修飾詞 (C# 7.2以上支援)

參考微軟MSDN的介紹
https://docs.microsoft.com/zh-tw/dotnet/csharp/language-reference/keywords/in-parameter-modifier
in關鍵字會使引數以傳址方式傳遞,但可確保不會修改引數。
- Jul 22 Fri 2022 12:04
-
物件導向開發必備咒文(220722)

備份一下,熟練度高可以習得無詠唱發動,但偶爾還是要詠唱一下,才能開啟或破關副本任務
Object is the instances of class.
Class is the definition of object.
- Jul 20 Wed 2022 17:03
-
在DataGridCell上雙擊後帶出所在的列所代表的資料

以之前的AppLog舉例
XAML:
<DataGrid.Resources>
<Style TargetType="{x:Type DataGridCell}">
<EventSetter Event="MouseDoubleClick" Handler="DataGridAppLogCell_MouseDoubleClick"/>
</Style>
</DataGrid.Resources>
- Jul 19 Tue 2022 11:05
-
將視窗拆成2*3的窗格
- Jul 12 Tue 2022 21:30
-
ItemsControl.ItemsSource關聯字串(string)型態資料檢視

WPF框架,先記錄簡單資料型態ObservableCollection<string>的關聯方式,較複雜的ObservableCollection<INotifyPropertyChanged>之後補充
以商品的買賣別舉例,將買賣列舉建立到動態資料集(ObservableCollection<string>)內,再與下拉式選單(ComboBox)建立關聯資料檢視
- Jul 06 Wed 2022 18:07
-
WPF視窗元件截圖
- Jan 28 Sun 2024 08:48
-
Google開源專案風格指南
參考資料,繁體:
https://tw-google-styleguide.readthedocs.io/en/latest/index.html
英文原文:
https://github.com/google/styleguide
https://tw-google-styleguide.readthedocs.io/en/latest/index.html
英文原文:
https://github.com/google/styleguide




