Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Which GUI Toolkit for variable User Interfaces and Mono-Compatibility Pin
softwarejaeger9-Sep-09 22:53
softwarejaeger9-Sep-09 22:53 
GeneralRe: Which GUI Toolkit for variable User Interfaces and Mono-Compatibility Pin
Mirko198010-Sep-09 2:13
Mirko198010-Sep-09 2:13 
GeneralRe: Which GUI Toolkit for variable User Interfaces and Mono-Compatibility Pin
softwarejaeger10-Sep-09 2:25
softwarejaeger10-Sep-09 2:25 
AnswerRe: Which GUI Toolkit for variable User Interfaces and Mono-Compatibility Pin
carlecomm24-Sep-09 21:50
carlecomm24-Sep-09 21:50 
QuestionRichTextBox with MaximumLine Limit Pin
Anindya Chatterjee9-Sep-09 21:57
Anindya Chatterjee9-Sep-09 21:57 
AnswerRe: RichTextBox with MaximumLine Limit Pin
Eddy Vluggen9-Sep-09 22:59
professionalEddy Vluggen9-Sep-09 22:59 
AnswerRe: RichTextBox with MaximumLine Limit Pin
carlecomm24-Sep-09 21:32
carlecomm24-Sep-09 21:32 
QuestionUser Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 21:21
Sivyo9-Sep-09 21:21 
this is the constructor

public set(int[] intSet)
       {
           this.boolSet = new bool[101];


           for (int i = 0; i < intSet.Length; )//change to while maybe
           {

               if (!(intSet[i] < 0 && intSet[i] > 100))
               {

                   boolSet[intSet[i]] = true;
                    i++;
               }
               else
               {
                   Console.WriteLine("This doesn't work");
               }
           }
       }


I noticed that i is always equal to zero

Also..

public override string ToString()
{
    Console.Write("this is the array:  ");
    int i = 0;

    while( i < boolSet.Length)
    {
        if (boolSet[i])
        {
            Console.Write("  " + (i+1));

        }
        i++;
    }
    Console.WriteLine("");
    return base.ToString();
}


This makes the boolean entry into a string to be printed, I have a random numbers coming through, there is always a 1 appearing in the array, if I take out the + 1 it will just be zero...

any help would be appreciated.

And yes, I know List would be good but this is an assignment and they want us to use array and to overwrite the ToString.

I am at a loss.
AnswerRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
SeMartens9-Sep-09 21:24
SeMartens9-Sep-09 21:24 
AnswerRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Christian Graus9-Sep-09 21:32
protectorChristian Graus9-Sep-09 21:32 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 21:51
Sivyo9-Sep-09 21:51 
AnswerRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
OriginalGriff9-Sep-09 21:37
mveOriginalGriff9-Sep-09 21:37 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 21:45
Sivyo9-Sep-09 21:45 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
SeMartens9-Sep-09 21:48
SeMartens9-Sep-09 21:48 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 21:57
Sivyo9-Sep-09 21:57 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 22:03
Sivyo9-Sep-09 22:03 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
SeMartens9-Sep-09 22:08
SeMartens9-Sep-09 22:08 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 22:10
Sivyo9-Sep-09 22:10 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
OriginalGriff9-Sep-09 21:58
mveOriginalGriff9-Sep-09 21:58 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
OriginalGriff9-Sep-09 22:02
mveOriginalGriff9-Sep-09 22:02 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 22:11
Sivyo9-Sep-09 22:11 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
SeMartens9-Sep-09 22:12
SeMartens9-Sep-09 22:12 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 22:14
Sivyo9-Sep-09 22:14 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
SeMartens9-Sep-09 22:19
SeMartens9-Sep-09 22:19 
GeneralRe: User Input Into Array, Need To Check Array Member If It Is Greater Then 100 Or Less Then 0 Pin
Sivyo9-Sep-09 22:21
Sivyo9-Sep-09 22:21 

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.