Click here to Skip to main content
15,890,399 members
Home / Discussions / C#
   

C#

 
AnswerRe: display analog clock Pin
Peace ON1-Jul-10 21:22
Peace ON1-Jul-10 21:22 
QuestionHow to Find character in ArrayList Pin
raju_shiva1-Jul-10 19:59
raju_shiva1-Jul-10 19:59 
AnswerRe: How to Find character in ArrayList Pin
ramzg1-Jul-10 20:11
ramzg1-Jul-10 20:11 
AnswerRe: How to Find character in ArrayList Pin
Keith Barrow1-Jul-10 21:06
professionalKeith Barrow1-Jul-10 21:06 
AnswerRe: How to Find character in ArrayList Pin
DaveyM692-Jul-10 1:24
professionalDaveyM692-Jul-10 1:24 
Questionnamespace name 'ArrayList' could not be found Pin
raju_shiva1-Jul-10 18:48
raju_shiva1-Jul-10 18:48 
AnswerRe: namespace name 'ArrayList' could not be found Pin
Abhinav S1-Jul-10 18:56
Abhinav S1-Jul-10 18:56 
QuestionHow to find the character in list Pin
raju_shiva1-Jul-10 18:15
raju_shiva1-Jul-10 18:15 
Hi sir,
As i am new to C#.I am comfused a bit to convert a code from VC++ to C#
which i did,

This is what i did in VC++

std::map<CString,CString>m_mapId;  // Declared a Map

         m_mapId["AA"];
	 m_mapId["AAA"];       //storing values in the list
         m_mapId["BB"];
         m_mapId["BBB"];

CTest1View::OnEditchangeCombo1() 
{
	
	CString strvalue;  	
	CString strTemp;	
	m_ctrlCombo.GetWindowText(strvalue);	
	std::map<CString,CString>::iterator it=m_mapId.begin();
	m_ctrlCombo.ResetContent();	
	for(; it!=m_mapId.end();it++)
	{
		strTemp = it->first;		
		if(strTemp.Find(strvalue)==0)
			m_ctrlCombo.AddString(strTemp);
	
	}

	m_ctrlCombo.SetWindowText(strvalue);	
        m_ctrlCombo.ShowDropDown();	
	
	
}

I am trying it in C#
List<string> cities = new List<string>(); // Declared a list

cities.Add("AAA");                        //storing values in the list
            cities.Add("AA");
            cities.Add("BBBB");
            cities.Add("BB");

comboBox1_KeyPress(object sender, KeyPressEventArgs e)
        {
            foreach (string A in cities)   //How to loop till end
            {
                MessageBox.Show(AA);        //  Get the result related to A
            }
      }


I am not getting how to loop till the end of list and find the character in the strings(one by one throughout the list)
and displaying them

Can anyone help me

Thanks
Raj
AnswerRe: How to find the character in list Pin
Abhinav S1-Jul-10 18:53
Abhinav S1-Jul-10 18:53 
Generalget the list of all page labels(numbers) Pin
TweakBird1-Jul-10 17:45
TweakBird1-Jul-10 17:45 
QuestionUnhandled exception handler problem Pin
Super Lloyd1-Jul-10 15:45
Super Lloyd1-Jul-10 15:45 
AnswerRe: Unhandled exception handler problem Pin
Luc Pattyn1-Jul-10 17:05
sitebuilderLuc Pattyn1-Jul-10 17:05 
GeneralRe: Unhandled exception handler problem Pin
Super Lloyd1-Jul-10 19:16
Super Lloyd1-Jul-10 19:16 
QuestionVS2010 Chart Control [modified] Pin
It_tech1-Jul-10 8:54
It_tech1-Jul-10 8:54 
AnswerRe: VS2010 Chart Control PinPopular
Pete O'Hanlon1-Jul-10 13:13
mvePete O'Hanlon1-Jul-10 13:13 
GeneralRe: VS2010 Chart Control Pin
It_tech1-Jul-10 18:51
It_tech1-Jul-10 18:51 
GeneralRe: VS2010 Chart Control Pin
Daniel Grunwald2-Jul-10 0:37
Daniel Grunwald2-Jul-10 0:37 
GeneralRe: VS2010 Chart Control Pin
DaveyM692-Jul-10 1:35
professionalDaveyM692-Jul-10 1:35 
GeneralRe: VS2010 Chart Control Pin
Pete O'Hanlon2-Jul-10 2:23
mvePete O'Hanlon2-Jul-10 2:23 
Questionto handle Multiple clients.... Pin
yum 20101-Jul-10 8:08
yum 20101-Jul-10 8:08 
AnswerThe hardest part of dealing with mulitple clients Pin
Ennis Ray Lynch, Jr.1-Jul-10 8:27
Ennis Ray Lynch, Jr.1-Jul-10 8:27 
Questionsending serialized listview over tcp Pin
teknolog1231-Jul-10 7:31
teknolog1231-Jul-10 7:31 
AnswerRe: sending serialized listview over tcp Pin
Not Active1-Jul-10 7:50
mentorNot Active1-Jul-10 7:50 
GeneralRe: sending serialized listview over tcp [modified] Pin
teknolog1231-Jul-10 8:10
teknolog1231-Jul-10 8:10 
QuestionHelp in Regular expressions Pin
shankbond1-Jul-10 6:53
shankbond1-Jul-10 6:53 

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.