home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / dotNETSDK / SETUP.EXE / netfxsd1.cab / CompCS_cs_1________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Encoding:
Text File  |  2001-08-21  |  534 b   |  27 lines

  1. using System;
  2. namespace CompCS {
  3.     public class StringComponent {
  4.         private string[] StringsSet; 
  5.         
  6.         public StringComponent() {
  7.             StringsSet = new string[] {
  8.                 "C# String 0",
  9.                 "C# String 1",
  10.                 "C# String 2",
  11.                 "C# 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.