home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / IntroDev / CompTest / ClientCS / ClientCS.cs < prev    next >
Encoding:
Text File  |  2000-06-23  |  1.3 KB  |  34 lines

  1. using System;
  2.  
  3. using CompVC;
  4. using CompCS;
  5. using CompVB;
  6.  
  7. // This "class" exists only to house the application's entry-point function
  8. class MainApp {
  9.     // Static method called "Main" is application's entry point function
  10.     public static void Main() {
  11.  
  12.         // Iterate over component's strings and dump them to the console 
  13.         CompCS.StringComponent myCSStringComp = new CompCS.StringComponent();
  14.         Console.WriteLine("Strings from C# StringComponent");                
  15.         for (int index = 0; index < myCSStringComp.Count; index++) {
  16.             Console.WriteLine(myCSStringComp.GetString(index));                
  17.         }    
  18.         
  19.         // Iterate over component's strings and dump them to the console 
  20.         CompVC.StringComponent myVCStringComp = new CompVC.StringComponent();
  21.         Console.WriteLine("\nStrings from VC StringComponent");                
  22.         for (int index = 0; index < myVCStringComp.Count; index++) {
  23.             Console.WriteLine(myVCStringComp.GetString(index));                
  24.         }    
  25.  
  26.         // Iterate over component's strings and dump them to the console 
  27.         CompVB.StringComponent myVBStringComp = new CompVB.StringComponent();
  28.         Console.WriteLine("\nStrings from VB StringComponent");                
  29.         for (int index = 0; index < myVBStringComp.Count; index++) {
  30.             Console.WriteLine(myVBStringComp.GetString(index));                
  31.         }    
  32.     }
  33. }
  34.