標籤:
軟體工程 2016.6.28 日報
今天,通過調查表的反饋明確了改進方向。對於我所負責的部分,需要改進的方向主要有兩個方面:
1、 改正加權平均分計算方法
2、 增加類似吐槽牆的功能,對每一位準備或已經選修某門課程的學生,都可以查看相應課程的吐槽牆,從中擷取到已經選修這麼的課程的同學的建議
根據需求,增加吐槽的功能涉及到了網路編程的部分,對於C#網路編程還有待學習。
今天主要學習了一下c#多線程部分的內容。
學習自部落格http://www.jb51.net/article/46234.htm
http://www.cnblogs.com/csMapx/archive/2011/06/20/2084647.html
http://www.cnblogs.com/miniwiki/archive/2010/06/18/1760540.html
以下是經過學習後寫的測試程式:
static void Main(string[] args) { Thread th1 = new Thread(printx); Thread th2 = new Thread(print); th1.Start(); th2.Start(‘y‘); while (th2.ThreadState != ThreadState.Stopped) { } Console.WriteLine(); Console.WriteLine("done"); Console.ReadKey(); } private static void printx() { for (int i = 0; i < 100; i++) Console.Write("x"); } private static void print(object c) { for (int i = 0; i < 100; i++) Console.Write("{0}", (char)c); Thread.Sleep(1000); }
測試程式結果
實驗結果中done實在xy輸出完畢後一段時間才顯示出來。
軟體工程 2016.6.28 日報