PDA

View Full Version : C# version of C++ code



Bsbosa.com
07-16-2010, 08:33 PM
Could anybody tell show me what the C# equivalent of this C++ code is please.


{
srand( ( int ) time (0));

int x,y,z, nums [50];

for ( x = 1 ; x < 50 ; x++ ) nums [x] = x ;

for ( x = 1 ; x < 50 ; x++ )

{
y = ( rand() % 49 ) + 1;

z = nums[x];
nums[x] = nums [y];
nums [y] = z;
}