| Last change
 on this file since 373 was             299, checked in by dai, 18 years ago | 
        
          | 
【32bitコンパイラ】静的リンクライブラリを実装
 ジェネリクスを実装
 ※64bitコンパイラは未実装
 
 | 
        
          | File size:
            617 bytes | 
      
      
| Line |  | 
|---|
| 1 | '-------------------------------------------------------------------- | 
|---|
| 2 | ' Test case of GCHandle Class | 
|---|
| 3 | '-------------------------------------------------------------------- | 
|---|
| 4 |  | 
|---|
| 5 | Namespace GCHandleTest | 
|---|
| 6 |  | 
|---|
| 7 | Sub TestMain() | 
|---|
| 8 | Dim o = New Object | 
|---|
| 9 | Dim gch = System.Runtime.InteropServices.GCHandle.Alloc(o) | 
|---|
| 10 | UnitTest("GCHandle.Alloc, Target", o.Equals(gch.Target)) | 
|---|
| 11 |  | 
|---|
| 12 | Dim ip = System.Runtime.InteropServices.GCHandle.ToIntPtr(gch) | 
|---|
| 13 | gch = Nothing | 
|---|
| 14 |  | 
|---|
| 15 | gch = System.Runtime.InteropServices.GCHandle.FromIntPtr(ip) | 
|---|
| 16 | UnitTest("GCHandle - IntPtr", o.Equals(gch.Target)) | 
|---|
| 17 |  | 
|---|
| 18 |  | 
|---|
| 19 | End Sub | 
|---|
| 20 |  | 
|---|
| 21 | End Namespace | 
|---|
| 22 |  | 
|---|
| 23 | GCHandleTest.TestMain() | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.