home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / IntroDev / CompTest / ClientVC / ClientVC.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.2 KB  |  32 lines

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