Click here to Skip to main content
16,015,697 members
Home / Discussions / C#
   

C#

 
GeneralRe: Setting focus to a Button Pin
Thomas Stockwell26-Apr-08 18:10
professionalThomas Stockwell26-Apr-08 18:10 
GeneralRe: Setting focus to a Button Pin
Anthony Mushrow26-Apr-08 18:20
professionalAnthony Mushrow26-Apr-08 18:20 
GeneralRe: Setting focus to a Button Pin
Urs Enzler26-Apr-08 22:48
Urs Enzler26-Apr-08 22:48 
GeneralRandomly Shuffle an Array Pin
Ian Uy26-Apr-08 17:44
Ian Uy26-Apr-08 17:44 
GeneralRe: Randomly Shuffle an Array Pin
Thomas Stockwell26-Apr-08 17:55
professionalThomas Stockwell26-Apr-08 17:55 
GeneralRe: Randomly Shuffle an Array Pin
Ian Uy26-Apr-08 17:56
Ian Uy26-Apr-08 17:56 
GeneralRe: Randomly Shuffle an Array Pin
PIEBALDconsult27-Apr-08 4:31
mvePIEBALDconsult27-Apr-08 4:31 
GeneralRe: Randomly Shuffle an Array Pin
ssclaire27-Apr-08 6:32
ssclaire27-Apr-08 6:32 
Why so complicated? Why not something simple like this? 'Hope I'm not missing something obvious.

int MyArray[] = {1,2,3,4,5,6,7,8,9,10};

// Shuffle array by stepping through each element and swapping each number with another random position.
Random RandomIndex = new Random();
for (int i = 0; i < MyArray.Length; i++)
{
int randomIndex = RandomIndex.Next(MyArray.Length);
int temp = MyArray[i];
MyArray[i] = MyArray[randomIndex];
MyArray[randomIndex] = temp;
}
QuestionClean Solution Pin
Reza Shojaee26-Apr-08 17:09
Reza Shojaee26-Apr-08 17:09 
GeneralRe: Clean Solution Pin
Christian Graus26-Apr-08 17:15
protectorChristian Graus26-Apr-08 17:15 
AnswerRe: Clean Solution Pin
Reza Shojaee26-Apr-08 17:24
Reza Shojaee26-Apr-08 17:24 
GeneralRe: Clean Solution Pin
Urs Enzler26-Apr-08 22:51
Urs Enzler26-Apr-08 22:51 
Generalquestion Pin
Nabil0026-Apr-08 14:55
Nabil0026-Apr-08 14:55 
GeneralRe: question Pin
Anthony Mushrow26-Apr-08 15:09
professionalAnthony Mushrow26-Apr-08 15:09 
GeneralRe: question Pin
Christian Graus26-Apr-08 16:44
protectorChristian Graus26-Apr-08 16:44 
AnswerRe: question Pin
Krazy Programmer26-Apr-08 19:11
Krazy Programmer26-Apr-08 19:11 
Generalhow to use google Pin
leckey27-Apr-08 14:55
leckey27-Apr-08 14:55 
QuestionButton in MDI floating over my child forms Pin
anjase26-Apr-08 12:02
anjase26-Apr-08 12:02 
GeneralRe: Button in MDI floating over my child forms Pin
Krazy Programmer26-Apr-08 19:13
Krazy Programmer26-Apr-08 19:13 
QuestionDllImport quick quetion please? [modified] Pin
mktrend26-Apr-08 11:18
mktrend26-Apr-08 11:18 
GeneralRe: DllImport quick quetion please? Pin
Christian Graus26-Apr-08 11:22
protectorChristian Graus26-Apr-08 11:22 
GeneralRe: DllImport quick quetion please? Pin
mktrend26-Apr-08 11:28
mktrend26-Apr-08 11:28 
GeneralRe: DllImport quick quetion please? Pin
Christian Graus26-Apr-08 11:34
protectorChristian Graus26-Apr-08 11:34 
GeneralRe: DllImport quick quetion please? Pin
mktrend26-Apr-08 11:37
mktrend26-Apr-08 11:37 
GeneralRe: DllImport quick quetion please? Pin
Christian Graus26-Apr-08 11:43
protectorChristian Graus26-Apr-08 11:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.