using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace 多線程{ class 同步模式 { public static void Main() { //對於不同步版本的順序調用,沒什麼值得說明的 //Demo d = new Demo() ;
using System;using System.Collections.Generic;using System.Text;using System.Collections;namespace ObserverDemo{ class Program { static void Main(string[] args) { BankAccount account = new BankAccount(); acco
using System;using System.Collections.Generic;using System.Text;namespace 不安全的程式碼{ unsafe class 指標指向類成員 { public static void Main( string[] args ) { Person obj = new Person(); fixed( float* pFloat
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;namespace 多線程{ class 線程池 { public static void Main() { int workNums ; int ioNums ;
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;namespace 多線程{ class 線程元子性 { private static Person per = new Person() ; public static void Main() { for(
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace 多線程{ class 非同步回調 { public delegate int TakesAwhileDel(int data, int ms); static void Main(string[] args) {
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics ;using System.Threading ;namespace 多線程{ class 競態問題示範 { public static void Main() { StateObject state = new
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Threading;namespace 多線程{ class 競態問題解決 { public static void Main() { StateObject state = new
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace CSharp基礎{ class 變數推斷 { static void Main(string[] args) { var name = "aladdin" ; var age = 13; Type nameTy
using System;using System.Collections.Generic;using System.Text;namespace IDisposeDemo{ class 回收資源樣本 { public static void Main( string[] args ) { using ( Person p = new Student() ) { }
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace CSharp基礎{ class 常量的特性 { //常量不允許用可變值給他賦值 , Person中這樣寫 public static int age = 200; //const int age = Person.age ; 報錯
using System;using System.Collections.Generic;using System.Text;namespace 不安全的程式碼{ unsafe class Program { static void Main( string[] args ) { int x = 10; //聲明2個整數指標