Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
GeneralRe: Guaging article interest about MEF before I start writing Pin
-james6-Oct-13 15:30
professional-james6-Oct-13 15:30 
AnswerRe: Guaging article interest about MEF before I start writing Pin
Brisingr Aerowing6-Oct-13 14:35
professionalBrisingr Aerowing6-Oct-13 14:35 
GeneralRe: Guaging article interest about MEF before I start writing Pin
-james6-Oct-13 15:36
professional-james6-Oct-13 15:36 
AnswerRe: Guaging article interest about MEF before I start writing Pin
Mycroft Holmes6-Oct-13 16:54
professionalMycroft Holmes6-Oct-13 16:54 
AnswerRe: Guaging article interest about MEF before I start writing Pin
Pete O'Hanlon7-Oct-13 0:17
mvePete O'Hanlon7-Oct-13 0:17 
Questiondictionary/list help needed Pin
yoni.kess6-Oct-13 4:54
yoni.kess6-Oct-13 4:54 
AnswerRe: dictionary/list help needed Pin
Richard MacCutchan6-Oct-13 5:09
mveRichard MacCutchan6-Oct-13 5:09 
GeneralRe: dictionary/list help needed Pin
yoni.kess6-Oct-13 5:20
yoni.kess6-Oct-13 5:20 
sorry
didnt notice it cut the code in the middle.

C#
<pre>private void button3_Click(object sender, EventArgs e)
        {


            #region testing new code from web

            // this is a new code from the web

            Dictionary<string, List<LatLongPair>> LatLongCollectionByName = new Dictionary<string, List<LatLongPair>>();

            List<LatLongPair> lst = null;
            LatLongPair lPair = null;
            string matchHandle = string.Empty;

            for (int i = 0; i < LayersGrid.Rows.Count; i++)
            {
                if (LayersGrid.Rows[i].Cells[1].Value.ToString() == matchHandle)
                {
                    lPair.Lat = Convert.ToDouble(LayersGrid.Rows[i].Cells[3].Value);
                    lPair.Lon = Convert.ToDouble(LayersGrid.Rows[i].Cells[2].Value);
                    lst.Add(lPair);
                }
                else
                {
                    matchHandle = LayersGrid.Rows[i].Cells[1].Value.ToString();
                    lPair = new LatLongPair();
                    lPair.Lat = Convert.ToDouble(LayersGrid.Rows[i].Cells[3].Value);
                    lPair.Lon = Convert.ToDouble(LayersGrid.Rows[i].Cells[2].Value);

                    lst = new List<LatLongPair>();
                    lst.Add(lPair);

                        LatLongCollectionByName.Add(matchHandle, lst);

                }

                foreach (KeyValuePair<string, List<LatLongPair>> item in LatLongCollectionByName)
                {
                    Console.WriteLine("\n For name : " + item.Key + ", lat/long vaues are:\n");

                    foreach (LatLongPair lp in item.Value)
                    {
                        Console.Write("\t" + lp.Lat + ",\t" + lp.Lon + " | ");
                    }
                }



GeneralRe: dictionary/list help needed Pin
Richard MacCutchan6-Oct-13 5:45
mveRichard MacCutchan6-Oct-13 5:45 
GeneralRe: dictionary/list help needed Pin
yoni.kess6-Oct-13 5:51
yoni.kess6-Oct-13 5:51 
GeneralRe: dictionary/list help needed Pin
Richard MacCutchan6-Oct-13 6:22
mveRichard MacCutchan6-Oct-13 6:22 
GeneralRe: dictionary/list help needed Pin
yoni.kess6-Oct-13 10:10
yoni.kess6-Oct-13 10:10 
GeneralRe: dictionary/list help needed Pin
Richard MacCutchan6-Oct-13 20:44
mveRichard MacCutchan6-Oct-13 20:44 
AnswerRe: dictionary/list help needed Pin
BillWoodruff6-Oct-13 16:58
professionalBillWoodruff6-Oct-13 16:58 
GeneralRe: dictionary/list help needed Pin
yoni.kess6-Oct-13 21:39
yoni.kess6-Oct-13 21:39 
GeneralRe: dictionary/list help needed Pin
BillWoodruff7-Oct-13 0:39
professionalBillWoodruff7-Oct-13 0:39 
QuestionEntity Framework: Primary key violation Pin
Lutosław6-Oct-13 2:55
Lutosław6-Oct-13 2:55 
AnswerRe: Entity Framework: Primary key violation Pin
Dave Kreskowiak6-Oct-13 6:28
mveDave Kreskowiak6-Oct-13 6:28 
GeneralRe: Entity Framework: Primary key violation Pin
Lutosław6-Oct-13 9:50
Lutosław6-Oct-13 9:50 
Questionupdate ConnectionString in App.config Pin
Jassim Rahma6-Oct-13 0:03
Jassim Rahma6-Oct-13 0:03 
AnswerRe: update ConnectionString in App.config Pin
OriginalGriff6-Oct-13 0:10
mveOriginalGriff6-Oct-13 0:10 
QuestionSimple cross threading question Pin
ve3tru5-Oct-13 17:55
ve3tru5-Oct-13 17:55 
AnswerRe: Simple cross threading question Pin
Abhinav S5-Oct-13 19:00
Abhinav S5-Oct-13 19:00 
GeneralRe: Simple cross threading question Pin
ve3tru6-Oct-13 16:03
ve3tru6-Oct-13 16:03 
AnswerRe: Simple cross threading question Pin
Dave Kreskowiak6-Oct-13 4:24
mveDave Kreskowiak6-Oct-13 4:24 

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.