-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Prasanna_kakanoor
Message 4 in Discussion

Hi,

 Here is the sample code for ur requirement. Hope this help u to solve the problem

                        ArrayList arrayList = new ArrayList();
                        
                        Boolean flag = true;

                        arrayList.Add("1");
                        arrayList.Add("1");
                        arrayList.Add("1");
                        arrayList.Add("1");
                        arrayList.Add("1");
                        
                        string temp = arrayList[0].ToString();

                        for (int i = 1; i<arrayList.Count;i++) {
                                if (!temp.Equals(arrayList[i])) {
                                        flag = false;
                                        break;
                                }
                        }
                        if (flag) 
                        {
                                MessageBox.Show("All values in array list is same");
                        } 
                        else 
                        {
                                MessageBox.Show("All values in array list is not 
same");
                        }

Thanks & Regards,
Prasanna K L [MCAD(CM) | MCSD.NET(Early Achiever)] [MS Community Star]


|Sr. Software Engineer�|First American Interactive Division|Office:+91 80�5115 6050  
Extn 4084 |Mobile:+91 98452 76356�|Fax:+91 80�841 1858 |[EMAIL PROTECTED] |
|Unit 1, Level 1, Explorer Building, International TechPark, Whitefield Road, 
Bangalore-560066|India| Website: www.firstam.com |

-----Original Message-----
From: Am2pm4 [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 19, 2004 9:07 AM
To: BDOTNET
Subject: Searching an element in an Array(Help Needed)



New Message on BDOTNET


Searching an element in an Array(Help Needed)
Reply

�
Reply to Sender ��Recommend 
Message 1 in Discussion 

From: Am2pm4 

I have an arraylist with elements .
Now it can happen that all the elements inside an ArrayList can be same or they can be 
different
�
I ned to check that.
�
a) If all the elements are same I need to get the value 
b) If elements are differnet I dont need any 
�
I am looking for an algorithm Please Help 
�


View other groups in this category. 


Also on MSN:
Start Chatting�|�Listen to Music�|�House & Home�|�Try Online Dating�|�Daily Horoscopes 

Passport Member Services. 
For other questions or feedback, go to our Contact Us page. 

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list. 
Remove my e-mail address from BDOTNET. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to