//Read data through port asynchronously public void AsyncRead(read s, bool start) { readCallback = s; isAsyncRead = start; //serialComPort.Close(); ////if(start) ////{ ////} ////else ////{ //// serialComPort.DataReceived -= new SerialDataReceivedEventHandler(serialComPort_DataReceived); ////} //Thread.Sleep(20); //Open(); }
static void Main(string[] args) { Console.Write("Introduceti n = "); var n = Int32.Parse(Console.ReadLine()); Mutex m = new Mutex(); m.WaitOne(); const string fileToWr = "result.txt"; m.ReleaseMutex(); for (int i = 0; i <= n; ++i) { File.WriteAllText(i.ToString(), (new Random().Next()).ToString()); } read r = new read(readDelegate); for (int i = 0; i < n; i++) { var asyncRes = r.BeginInvoke(i.ToString(), fileToWr, null, null); } }
' The type of access requested (read/write).
dateTimePicker_Tu.Value = DateTime.Parse(read["Bhytgiatritu"].ToString());
NaN and Infinity aren't officially supported by JSON (read more about this issue... I lol'd @ the first comment on the first answer)