hamed hossani

hamed hossani

  • NA
  • 6
  • 16.3k

how define (number range) enum in c#

Apr 17 2011 1:11 AM
hi all
I define the type with ENUM in number range [1-n] n is the Maximum number.
I will define this range to specify the array.

string[] array1=new string[1-n] // means  start index for this array is 1 and finish index is n
how define this range?

similar this Pascal code[partion of  algorithm Buddy System Allocation memory]

CONST NULL = -1;
TYPE   address:    NULL..m;
          sizeindex:  1..n;
VAR
      size :          array[sizeindex] of 1..m;
      subbuddy :  array[sizeindex] of 0..n;
      memory :    array[0..m] of paced record 
                                     tag:          (available,allocated);
                                     a,b:          (left,right):
                                     index:        sizeindex;
                                     forward:     address;
                                     backward:  address;
                              end;

 tanks a lot.

Answers (3)