Click here to Skip to main content
15,881,089 members
Home / Discussions / C#
   

C#

 
QuestionUser Settings Not Persisting Pin
Kevin Marois8-May-12 10:53
professionalKevin Marois8-May-12 10:53 
AnswerRe: User Settings Not Persisting Pin
SledgeHammer018-May-12 13:03
SledgeHammer018-May-12 13:03 
GeneralRe: User Settings Not Persisting Pin
Kevin Marois9-May-12 6:55
professionalKevin Marois9-May-12 6:55 
GeneralRe: User Settings Not Persisting Pin
SledgeHammer019-May-12 7:11
SledgeHammer019-May-12 7:11 
QuestionJaggedarray Null Reference Exception Pin
ariez888-May-12 10:07
ariez888-May-12 10:07 
AnswerRe: Jaggedarray Null Reference Exception Pin
Richard MacCutchan8-May-12 21:53
mveRichard MacCutchan8-May-12 21:53 
AnswerRe: Jaggedarray Null Reference Exception Pin
V.8-May-12 21:56
professionalV.8-May-12 21:56 
GeneralRe: Jaggedarray Null Reference Exception Pin
ariez889-May-12 2:49
ariez889-May-12 2:49 
Thanks for your reply.
I m implementing Sudoku that computer will play after the user inputs certain numbers in its grid. The logic that I m following is that the function PossibleNumbers() calculates the numbers that are possible for each cell of 9x9 grid of Sudoku.The number of numbers possible for each cell may Vary. If for example 1, 3 are numbers possible for one cell, then 2,3,4 maybe possible for other cell.PossibleNumbers() runs for every cell of the grid. Here is its implementation

private int[] PossibleNumbers()
{ int[] PossibleNumbers = new int[] { 1, 2, 3, 4, 5, 6 };
Array.Clear(PossibleValues, 0, 6);
int k = 0;

for (int i=0 ; i < PossibleNumbers.Length; i++)
{
int count = 0;
for (int j=0 ; j < tempArray.Length; j++)
{
if (tempArray[j] == Convert.ToInt32(PossibleNumbers[i]))
{
count++;
break;
}
}
if (count == 0)
{
PossibleValues[k] = PossibleNumbers[i];
k++;
}
}
return PossibleValues;
}

The size of PossibleValues is set to 6 at the time of initializing it.so if two numbers are possible for a cell then the remaining 4 indexes will contain zero. And this is the problem. How do I go about it.

Please Help!
Thanks
GeneralRe: Jaggedarray Null Reference Exception Pin
ariez889-May-12 2:53
ariez889-May-12 2:53 
GeneralRe: Jaggedarray Null Reference Exception Pin
V.9-May-12 2:59
professionalV.9-May-12 2:59 
GeneralRe: Jaggedarray Null Reference Exception Pin
ariez889-May-12 7:15
ariez889-May-12 7:15 
GeneralRe: Jaggedarray Null Reference Exception Pin
V.9-May-12 19:55
professionalV.9-May-12 19:55 
GeneralRe: Jaggedarray Null Reference Exception Pin
ariez889-May-12 20:02
ariez889-May-12 20:02 
GeneralRe: Jaggedarray Null Reference Exception Pin
V.9-May-12 20:11
professionalV.9-May-12 20:11 
QuestionHow to open File using System.Diagnostics.Start in the Base Root directory Pin
nassimnastaran8-May-12 9:52
nassimnastaran8-May-12 9:52 
AnswerMessage Removed Pin
8-May-12 10:08
professionalN_tro_P8-May-12 10:08 
GeneralRe: How to open File using System.Diagnostics.Start in the Base Root directory Pin
nassimnastaran8-May-12 10:33
nassimnastaran8-May-12 10:33 
GeneralRe: How to open File using System.Diagnostics.Start in the Base Root directory Pin
Dave Kreskowiak8-May-12 13:15
mveDave Kreskowiak8-May-12 13:15 
AnswerRe: How to open File using System.Diagnostics.Start in the Base Root directory Pin
Luc Pattyn8-May-12 14:07
sitebuilderLuc Pattyn8-May-12 14:07 
GeneralRe: How to open File using System.Diagnostics.Start in the Base Root directory Pin
nassimnastaran9-May-12 4:46
nassimnastaran9-May-12 4:46 
QuestionC# forms Pin
Member 89392888-May-12 2:21
Member 89392888-May-12 2:21 
AnswerRe: C# forms Pin
Pete O'Hanlon8-May-12 2:29
mvePete O'Hanlon8-May-12 2:29 
AnswerRe: C# forms Pin
Tim Groven8-May-12 5:58
Tim Groven8-May-12 5:58 
AnswerRe: C# forms Pin
Reegan Durai.m8-May-12 19:16
Reegan Durai.m8-May-12 19:16 
QuestionC# dice program (combobox selection) Pin
Angel_788-May-12 1:19
Angel_788-May-12 1:19 

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.