home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / Deployment / 4_Shared / Stringer / Stringer.cs < prev   
Encoding:
Text File  |  2000-06-23  |  510 b   |  27 lines

  1. using System;
  2. namespace org.Test {
  3.     public class Stringer {
  4.         private string[] StringsSet; 
  5.         
  6.         public Stringer() {
  7.             StringsSet = new string[] {
  8.                 "String 0",
  9.                 "String 1",
  10.                 "String 2",
  11.                 "String 3"            
  12.             };
  13.         }
  14.         
  15.         public string GetString(int index) {
  16.             if ((index < 0) || (index >= StringsSet.Length)) {
  17.                 throw new IndexOutOfRangeException();
  18.             }            
  19.             return StringsSet[index];
  20.         }
  21.  
  22.         public int Count {
  23.             get { return StringsSet.Length; }
  24.         }    
  25.     }
  26. }
  27.