Click here to Skip to main content
15,920,629 members
Home / Discussions / C#
   

C#

 
AnswerRe: Test is a form is closed [modified] Pin
Anthony Mushrow12-May-08 10:36
professionalAnthony Mushrow12-May-08 10:36 
GeneralRe: Test is a form is closed Pin
baranils12-May-08 18:58
baranils12-May-08 18:58 
AnswerRe: Test is a form is closed Pin
Christian Graus12-May-08 12:08
protectorChristian Graus12-May-08 12:08 
Questionint[] reference issue Pin
shamidi12-May-08 9:43
shamidi12-May-08 9:43 
AnswerRe: int[] reference issue Pin
Ed.Poore12-May-08 10:13
Ed.Poore12-May-08 10:13 
GeneralRe: int[] reference issue Pin
shamidi12-May-08 10:33
shamidi12-May-08 10:33 
GeneralRe: int[] reference issue Pin
Ed.Poore12-May-08 12:28
Ed.Poore12-May-08 12:28 
AnswerRe: int[] reference issue Pin
#realJSOP12-May-08 10:16
professional#realJSOP12-May-08 10:16 
I'm pretty sure that all of the VS versions come with a debugger. Ever thought of trying it?

As far as the comparison is concerned, you have to give us more info - do the arrays only match if it contains the same set of numbers? Does it only match if all of the elements are in the same order? Are both arrays always going to be the same size?

It looks like a loop is your only viable choice of testing for equality. Here's one approach given the array and the order of elements specified:

bool matches = true;
for (int i = 0; i < x.Length; i++)
{
	matches = (((x[i] + y[i]) % 2) == 0);
	if (!matches)
	{
		break;
	}
}



"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


GeneralRe: int[] reference issue Pin
shamidi12-May-08 10:35
shamidi12-May-08 10:35 
GeneralRe: int[] reference issue Pin
Anthony Mushrow12-May-08 10:41
professionalAnthony Mushrow12-May-08 10:41 
GeneralRe: int[] reference issue Pin
#realJSOP12-May-08 10:50
professional#realJSOP12-May-08 10:50 
AnswerRe: int[] reference issue Pin
Guffa12-May-08 21:28
Guffa12-May-08 21:28 
GeneralRe: int[] reference issue Pin
#realJSOP13-May-08 1:20
professional#realJSOP13-May-08 1:20 
JokeRe: int[] reference issue Pin
Guffa13-May-08 2:05
Guffa13-May-08 2:05 
AnswerRe: int[] reference issue Pin
Le centriste14-May-08 6:24
Le centriste14-May-08 6:24 
QuestionHow to retrive the value? Pin
Luckie12-May-08 9:04
Luckie12-May-08 9:04 
AnswerRe: How to retrive the value? Pin
Ennis Ray Lynch, Jr.12-May-08 9:09
Ennis Ray Lynch, Jr.12-May-08 9:09 
GeneralRe: How to retrive the value? Pin
Luckie12-May-08 9:18
Luckie12-May-08 9:18 
AnswerRe: How to retrive the value? Pin
led mike12-May-08 9:18
led mike12-May-08 9:18 
GeneralRe: How to retrive the value? Pin
Luckie12-May-08 9:26
Luckie12-May-08 9:26 
GeneralRe: How to retrive the value? Pin
KaptinKrunch12-May-08 10:31
KaptinKrunch12-May-08 10:31 
GeneralRe: How to retrive the value? Pin
led mike12-May-08 10:32
led mike12-May-08 10:32 
GeneralRe: How to retrive the value? Pin
Luckie12-May-08 10:47
Luckie12-May-08 10:47 
GeneralRe: How to retrive the value? Pin
led mike13-May-08 5:50
led mike13-May-08 5:50 
GeneralRe: How to retrive the value? Pin
Luckie13-May-08 6:52
Luckie13-May-08 6:52 

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.