Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
QuestionOpen Form From another Project with its Name Pin
a-erfani2-Aug-12 23:18
a-erfani2-Aug-12 23:18 
GeneralRe: Open Form From another Project with its Name Pin
Eddy Vluggen2-Aug-12 23:34
professionalEddy Vluggen2-Aug-12 23:34 
GeneralRe: Open Form From another Project with its Name Pin
a-erfani3-Aug-12 0:09
a-erfani3-Aug-12 0:09 
AnswerRe: Open Form From another Project with its Name Pin
Eddy Vluggen3-Aug-12 0:18
professionalEddy Vluggen3-Aug-12 0:18 
GeneralRe: Open Form From another Project with its Name Pin
Ed Hill _5_3-Aug-12 0:34
Ed Hill _5_3-Aug-12 0:34 
AnswerRe: Open Form From another Project with its Name Pin
Ed Hill _5_3-Aug-12 0:28
Ed Hill _5_3-Aug-12 0:28 
GeneralRe: Open Form From another Project with its Name Pin
Eddy Vluggen3-Aug-12 0:58
professionalEddy Vluggen3-Aug-12 0:58 
GeneralRe: Open Form From another Project with its Name Pin
a-erfani3-Aug-12 2:45
a-erfani3-Aug-12 2:45 
GeneralExtracting images from pdf without loosing image quality Pin
chanakamax2-Aug-12 23:00
chanakamax2-Aug-12 23:00 
GeneralRe: Extracting images from pdf without loosing image quality Pin
BillWoodruff4-Aug-12 5:17
professionalBillWoodruff4-Aug-12 5:17 
GeneralRe: Extracting images from pdf without loosing image quality Pin
chanakamax7-Aug-12 18:28
chanakamax7-Aug-12 18:28 
QuestionRead GUID Pin
deepratna2-Aug-12 21:26
deepratna2-Aug-12 21:26 
AnswerRe: Read GUID Pin
Eddy Vluggen2-Aug-12 23:24
professionalEddy Vluggen2-Aug-12 23:24 
AnswerRe: Read GUID Pin
jschell4-Aug-12 7:22
jschell4-Aug-12 7:22 
QuestionPaypal for desktop application Pin
sharmaravi1232-Aug-12 19:55
sharmaravi1232-Aug-12 19:55 
AnswerRe: Paypal for desktop application Pin
Mycroft Holmes2-Aug-12 20:17
professionalMycroft Holmes2-Aug-12 20:17 
AnswerRe: Paypal for desktop application Pin
jschell4-Aug-12 7:25
jschell4-Aug-12 7:25 
GeneralRe: Paypal for desktop application Pin
sharmaravi1239-Aug-12 0:40
sharmaravi1239-Aug-12 0:40 
GeneralRe: Paypal for desktop application Pin
jschell10-Aug-12 12:15
jschell10-Aug-12 12:15 
QuestionHow to write and move text on image Pin
Member 37694462-Aug-12 16:46
Member 37694462-Aug-12 16:46 
GeneralRe: How to write and move text on image Pin
Eddy Vluggen2-Aug-12 20:49
professionalEddy Vluggen2-Aug-12 20:49 
AnswerRe: How to write and move text on image Pin
BillWoodruff4-Aug-12 5:11
professionalBillWoodruff4-Aug-12 5:11 
Questionsql table change notifications Pin
HimalR82-Aug-12 4:28
HimalR82-Aug-12 4:28 
AnswerRe: sql table change notifications Pin
BobJanova2-Aug-12 4:40
BobJanova2-Aug-12 4:40 
QuestionFinding value in a list Pin
Nathaniel Sumaya1-Aug-12 23:33
Nathaniel Sumaya1-Aug-12 23:33 
C#
public Country(string cAbs, string cName)
{
    this._country = cName;
    this._abs = cAbs;
}


private void btnOk_Click(object sender, EventArgs e)
        {
            Country myCountry = new Country();

            CountryList countries = new CountryList();

            countries.Add(new Country("AE", "United Arab Emirates"));
            countries.Add(new Country("AF", "Afghanistan"));
            countries.Add(new Country("AQ", "Antarctica"));
            countries.Add(new Country("AR", "Argentina"));
            countries.Add(new Country("AT", "Austria"));
            countries.Add(new Country("AU", "Australia"));
            countries.Add(new Country("BD", "Bangladesh"));
            countries.Add(new Country("BE", "Belgium"));
            countries.Add(new Country("BR", "Brazil"));
            countries.Add(new Country("BS", "Bahamas"));
            countries.Add(new Country("CA", "Canada"));
            countries.Add(new Country("CH", "Switzerland"));
            countries.Add(new Country("CL", "Chilie"));
            countries.Add(new Country("CM", "Cameroon"));
            countries.Add(new Country("CL", "Chilie"));
            countries.Add(new Country("CN", "China"));
            countries.Add(new Country("CO", "Columbia"));
            countries.Add(new Country("CR", "Costa Rica"));
            countries.Add(new Country("DK", "Denmark"));
            countries.Add(new Country("DM", "Dominica"));
            countries.Add(new Country("DO", "Domican Republic"));
            countries.Add(new Country("EC", "Ecuador"));
            countries.Add(new Country("EE", "Estonia"));
            countries.Add(new Country("EG", "Egypt"));
            countries.Add(new Country("ES", "Spain"));
            countries.Add(new Country("ET", "Ethiopia"));
            countries.Add(new Country("EU", "European Union"));

            //CountryList country = countries.Where(f=> f.CountryAbreviation == this.textBox1.Text)  

            //Country country = countries.Where(f => f.CountryAbreviation == this.textBox1.Text).OrderByDescending(f => f.CountryAbreviation).FirstOrDefault();
                       
        }


Question:

1. How to find the a country in a list?

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.