今天測試同步播放兩支影片
目前分類:C# (147)
- Nov 28 Tue 2023 09:46
同步播放兩支影片
- Nov 20 Sun 2022 11:12
安裝Log4net,每分鐘生成一個日誌文件
- Sep 26 Mon 2022 20:18
Download .NET SDKs for Visual Studio
- Sep 13 Mon 2021 10:14
A Simple C# window form Application using SQLite and Dapper
nuGet管理套件安裝
- Dec 06 Fri 2019 10:06
偏好隱含型別的區域變數
1: static void Main(string[] args)
2: {
3: var v1 = f1();
4: var avg1 = v1 / 3;
5: Console.WriteLine($"{avg1.GetType().Name}, avg: {avg1}");
6:
7: var v2 = f2();
8: var avg2 = v2 / 3;
9: Console.WriteLine($"{avg2.GetType().Name}, avg: {avg2}");
10:
11: var v3 = f3();
12: var avg3 = v3 / 3;
13: Console.WriteLine($"{avg3.GetType().Name}, avg: {avg3}");
14:
15: var v4 = f4();
16: var avg4 = v4 / 3;
17: Console.WriteLine($"{avg4.GetType().Name}, avg: {avg4}");
18:
19: var v5 = f5();
20: var avg5 = v5 / 3;
21: Console.WriteLine($"{avg5.GetType().Name}, avg: {avg5}");
22: Console.ReadKey();
23: }
24: static double f1()
25: {
26: double x = 100;
27: return x;
28: }
29: static float f2()
30: {
31: float x = 100;
32: return x;
33: }
34: static decimal f3()
35: {
36: decimal x = 100;
37: return x;
38: }
39: static long f4()
40: {
41: long x = 100;
42: return x;
43: }
44: static Int32 f5()
45: {
46: Int32 x = 100;
47: return x;
48: }
- Sep 19 Thu 2019 10:07
C# Create a Bitmap from a IntPtr
C# call a c++ method, which is called GetSourceImage(…)
- Sep 08 Sun 2019 21:13
多執行緒與非同步執行
- Mar 21 Thu 2019 10:41
列舉(枚舉)值看作位標記
1:
2: enum Animal
3: {
4: Dog = 0x0001,
5: Cat = 0x0002,
6: Duck = 0x0004,
7: Chicken = 0x0008
8: }
9: static void Main(string[] args)
10: {
11: Animal animals = Animal.Dog | Animal.Cat;
12: Console.WriteLine(animals.ToString());
13: Console.ReadKey();
14: }
- Mar 21 Thu 2019 09:50
[C#.NET] 定義常數時用 readonly 好? 還是 const 好?
- Feb 27 Wed 2019 15:38
C# Serialization & Deserialization
- Feb 27 Wed 2019 14:57
SQLite 資料庫 C# 程式範例
- Feb 23 Sat 2019 11:32
C#中Json的序列化和反序列化
- Feb 02 Sat 2019 09:21
C# AES 加解密CryptographicException 填補無效,而且無法移除 問題
在做AES 加解密 發生 CryptographicException 填補無效,而且無法移除錯誤,
- Feb 01 Fri 2019 14:48
軟體加密+硬體鎖保護
取得電腦資訊
- Jan 24 Thu 2019 11:27
Load x64 or a x86 DLL depending upon the platform? [duplicate]
- Nov 21 Wed 2018 09:45
資料庫CRUD(Create/Read/Update/Delete)
The CREATE DATABASE statement is used to create a database.
- Nov 21 Wed 2018 09:41
資料庫CRUD(Create/Read/Update/Delete)
The CREATE DATABASE statement is used to create a database.
- Nov 04 Sun 2018 03:27
IEnumerable和Yield
首先, 以ArrayList為例,透過foreach指令來依序讀取內容物
1: ArrayList list = new ArrayList();
2: list.Add("1");
3: list.Add(2);
4: list.Add("3");
5: list.Add('4');
6: foreach(object o in list)
7: {
8: Console.Write($"{o.GetType().ToString()} :");
9: Console.WriteLine(o);
10: }
- Oct 29 Mon 2018 09:46
c# 6.0 以內差字串取代string.Format()