MyStream.UseWaitHandle C# (CSharp) Method

UseWaitHandle() public method

public UseWaitHandle ( ) : bool
return bool
 public bool UseWaitHandle() {
 try { 
 WaitHandle wh1 = this.CreateWaitHandle();
 WaitHandle wh2 = this.CreateWaitHandle();
 WaitHandle wh3 = this.CreateWaitHandle();
 WaitHandle wh4 = this.CreateWaitHandle();
 if(wh3.Equals(wh4)) {
 return false;
 }
 return true;
 }
 catch(Exception e) {  return false;}
 }
 public override bool CanRead {  get { return true;} }

Usage Example

コード例 #1
0
 public static void Main() {
 int errors = 0;
 int testcases = 0;
 testcases++;
 MyStream myStream = new MyStream();
 if(! myStream.UseWaitHandle())
   errors++;
 Environment.ExitCode = errors;
 }