https://dotblogs.com.tw/yc421206/2009/08/09/9966
https://www.twblogs.net/a/5c46a628bd9eee35b21efde4
https://dotblogs.com.tw/yc421206/2009/08/09/9966
https://www.twblogs.net/a/5c46a628bd9eee35b21efde4
https://blog.xuite.net/f8789/DCLoveEP/36480071-C%23+-+%E5%AF%A6%E4%BD%9C%E8%BC%89%E5%85%A5%E5%A4%96%E9%83%A8+DLL+%E5%A4%96%E4%B8%A6%E4%BD%BF%E7%94%A8+Method
https://www.prugg.at/2019/09/09/properly-detect-windows-version-in-c-net-even-windows-10/
https://kknews.cc/zh-tw/code/xyvjxq.html
https://docs.microsoft.com/zh-tw/windows/win32/api/winnt/ns-winnt-osversioninfoa?redirectedfrom=MSDN
https://www.youtube.com/watch?v=uE6EHy_hgng
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
List<string> ary = new List<string>()
{
"tony",
"mary",
"c:"
};
string var = @"tony\sss\ee";
//ary.ForEach(x => x = var);
label1.Text = ary.FirstOrDefault(x => var.Contains(x));
}
bool flag = false;
private void _watch_Created(object sender, FileSystemEventArgs e)
{
先非同步過濾
下面放在非同步裡面
存入 Queue(e.FullPath);
if (!flag)
{
flag = true;
用非同步的方法 handleQueue();
}
}
public asyc void handleQueue()
{
//逐筆處理 Queue集合的東西
flag = flase;
}
}
}
https://www.bilibili.com/video/BV1c441167KQ/?spm_id_from=333.788.videocard.0
https://www.bilibili.com/video/av92363688/
https://www.bilibili.com/video/BV1XJ411q7yy/?spm_id_from=333.788.videocard.0
https://www.bilibili.com/video/BV1sV411f7KS
https://space.bilibili.com/88225156/channel/detail?cid=117664
https://search.bilibili.com/all?keyword=%E5%B8%82%E5%9C%BA%E8%B0%83%E7%A0%94%E5%92%8C%E4%BA%A7%E5%93%81%E8%A7%84%E5%88%92&from_source=nav_search_new
https://www.bilibili.com/video/BV1Z64y1F7Ah/?spm_id_from=333.788.videocard.2
https://www.bilibili.com/video/BV19J411R7Pc?from=search&seid=5540238887719149637
https://www.youtube.com/watch?v=XrH6q5_VkwQ
https://www.youtube.com/watch?v=RGewr2UuWmk
https://www.youtube.com/watch?v=ZxW9v0CflH4
https://blog.xuite.net/grimmslaw/78/52048294-%E5%BA%8F%E5%88%97%E5%8C%96%EF%BC%88Serialization%EF%BC%89
序列化(Serialization)是.NET平臺最酷的特性之一。
1、為什麼要序列化:
首先你應該明白序列化的目的就不難理解他了。序列化的目的就是能在網路上傳輸物件,否則就無法實現面向物件的分散式計算。比如你的用戶端要調用伺服器上的一個方法獲得一個產品物件,比如方法為:public Product findProduct(int product_id);
注意該方法返回一個Product物件,如果沒有序列化技術,用戶端就收不到返回的物件Product。而序列化的實現就是把物件變成一個可在網路上傳輸的位元組流。
2、利用序列化技術,可以實現物件的備份和還原。序列化可以將記憶體中的物件(或物件圖)序列化為資料流程,並保存到磁片上進行持久化;還可以將資料流程反序列化為物件,實現物件的還原。序列化技術在分散式系統的資料傳輸中得到充分的利用,如:XML Web Service 利用XML序列化實現跨平臺,.NET Remoting 則用到了二進位序列化和SOAP序列化。
.NET Compact Framework 2.0 支援XML序列化,不支援二進位序列化和SOAP序列化。而 .NET Compact Framework 1.0 連XML序列化都不支持。不過 OpenNETCF 1.x 為 .NET CF 1.0 實現了一個XML序列化的類,這個類在 OpenNETCF.Xml.dll 程式集中可以找到。
序列化和反序列化用於將一個物件保存到檔,和從檔讀取。
View Source------------------------------------------------------------------------------
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
[Serializable()]//可以序列化的類需要用這個屬性標記
public class ToBeSerialized
{
public int a;
public string b;
public ToBeSerialized(int a,string b)
{
this.a=a;
this.b=b;
}
}
public class Test
{
public void Serialize()//序列化
{
ToBeSerialized tbs = new ToBeSerialized(22,"SOM");
Stream fs = File.Create("Serialized.txt");
BinaryFormatter serializer = new BinaryFormatter();
serializer.Serialize(fs, tbs);
fs.Close();
}
public void DeSerialize()//反序列化
{
ToBeSerialized restore;
Stream fs = File.OpenRead("Serialized.txt");
BinaryFormatter deserializer = new BinaryFormatter();
restore = (ToBeSerialized)(deserializer.Deserialize(fs));//反序列化得到的物件
fs.Close();
}
}
https://www.bilibili.com/video/BV1Sk4y1m7av
https://www.youtube.com/watch?v=RGewr2UuWmk
https://www.youtube.com/watch?v=ZxW9v0CflH4
https://www.itread01.com/content/1544714307.html