Click here to Skip to main content
15,886,055 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem With Voice Chat Application Pin
Marco Bertschi18-Mar-13 11:39
protectorMarco Bertschi18-Mar-13 11:39 
GeneralRe: Problem With Voice Chat Application Pin
Ǯmr MànďǾǿ18-Mar-13 11:52
Ǯmr MànďǾǿ18-Mar-13 11:52 
GeneralRe: Problem With Voice Chat Application Pin
Marco Bertschi18-Mar-13 21:29
protectorMarco Bertschi18-Mar-13 21:29 
Questionhow can i make a double click event in c# with access Pin
User349018-Mar-13 7:44
User349018-Mar-13 7:44 
AnswerRe: how can i make a double click event in c# with access Pin
Eddy Vluggen18-Mar-13 8:07
professionalEddy Vluggen18-Mar-13 8:07 
GeneralMessage Closed Pin
18-Mar-13 9:10
User349018-Mar-13 9:10 
GeneralRe: how can i make a double click event in c# with access Pin
Eddy Vluggen18-Mar-13 9:16
professionalEddy Vluggen18-Mar-13 9:16 
QuestionC# StreamReader Case sensitive Pin
Member 987302818-Mar-13 6:09
Member 987302818-Mar-13 6:09 
Hi All,

I just have a quick query, I am reasonably new to C#.

My program currently reads a text file and compares it with the value in a text box and then tells me how many matches, this currently works.

My query is that it is case sensitive. Is there any way to make it so it doesn't matter whether it is in upper or lower case?

Any help will be much appreciated!

Many thanks,

Katie.


This is my code:
C#
if (!String.IsNullOrEmpty(CustodianEAddress.Text))
{
    for (AddressLength1 = 0; AddressLength1 < Length; AddressLength1++)
    {
        List<string> list1 = new List<string>();
        using (StreamReader reader = new StreamReader(FileLocation))
        {
            string line1;
            //max 500
            string[] LineArray1 = new string[500];

            while ((line1 = reader.ReadLine()) != null)
            {
                list1.Add(line1); // Add to list.

                if (line1.IndexOf(cust1[AddressLength1].ToString()) != -1)
                {
                    count1++;
                    LineArray1[count1] = line1;
                }
            }

            reader.Close();
            using (System.IO.StreamWriter filed = 
               new System.IO.StreamWriter(FileLocation, true))
            {
                filed.WriteLine("");
                filed.WriteLine("The email address " + 
             cust1[AddressLength1].ToString() + " was found " + count1 +
             " times within the recipient's inbox");
            }

            string count1a;
            count1a = count1.ToString();
        }
    }
}
else
{
    MessageBox.Show("Please Enter an Email Address");
}


So basically, I need to compare the value in cust1[AddressLength1] with any values found in an array which is in the text file.

modified 18-Mar-13 14:04pm.

AnswerRe: C# StreamReader Case sensitive Pin
R. Giskard Reventlov18-Mar-13 6:41
R. Giskard Reventlov18-Mar-13 6:41 
GeneralRe: C# StreamReader Case sensitive Pin
Member 987302818-Mar-13 8:06
Member 987302818-Mar-13 8:06 
AnswerRe: C# StreamReader Case sensitive Pin
OriginalGriff18-Mar-13 6:41
mveOriginalGriff18-Mar-13 6:41 
GeneralRe: C# StreamReader Case sensitive Pin
Member 987302818-Mar-13 8:06
Member 987302818-Mar-13 8:06 
AnswerRe: C# StreamReader Case sensitive Pin
Richard Deeming18-Mar-13 8:56
mveRichard Deeming18-Mar-13 8:56 
AnswerRe: C# StreamReader Case sensitive Pin
Matt T Heffron18-Mar-13 9:25
professionalMatt T Heffron18-Mar-13 9:25 
QuestionHow to build an sms sending application in C# and Access Pin
Arif_Aqeel18-Mar-13 3:17
Arif_Aqeel18-Mar-13 3:17 
AnswerRe: How to build an sms sending application in C# and Access Pin
Marco Bertschi18-Mar-13 3:28
protectorMarco Bertschi18-Mar-13 3:28 
AnswerRe: How to build an sms sending application in C# and Access Pin
Vasudevan Deepak Kumar18-Mar-13 9:10
Vasudevan Deepak Kumar18-Mar-13 9:10 
Questioncode for genetic algorithm Pin
06b17-Mar-13 21:53
06b17-Mar-13 21:53 
AnswerRe: code for genetic algorithm Pin
Marco Bertschi17-Mar-13 23:55
protectorMarco Bertschi17-Mar-13 23:55 
GeneralRe: code for genetic algorithm Pin
Keith Barrow18-Mar-13 1:49
professionalKeith Barrow18-Mar-13 1:49 
AnswerRe: code for genetic algorithm Pin
Hari Om Prakash Sharma18-Mar-13 1:40
Hari Om Prakash Sharma18-Mar-13 1:40 
AnswerWhat Is the code of one hand clapping? Pin
Keith Barrow18-Mar-13 1:51
professionalKeith Barrow18-Mar-13 1:51 
GeneralRe: What Is the code of one hand clapping? Pin
Pete O'Hanlon18-Mar-13 1:54
mvePete O'Hanlon18-Mar-13 1:54 
GeneralRe: What Is the code of one hand clapping? Pin
Marco Bertschi18-Mar-13 3:26
protectorMarco Bertschi18-Mar-13 3:26 
SuggestionRe: code for genetic algorithm Pin
Steve4419-Mar-13 15:04
Steve4419-Mar-13 15:04 

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.