Click here to Skip to main content
15,920,053 members
Home / Discussions / C#
   

C#

 
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 
Hi Yoni.Kess,

I don't think you need to post any more code in order to solve your challenge Smile | :)

If you get the object-structure right, you can make it serializable into XML; if you've got the XML, you can, if necessary, transform it into KML with an XSLT. I'm not familiar with KML, but I would guess that there's probably good tools available to create it. My impression from looking at your data is that it's simple, and there's nothing there that's recursive, and that you can easily create your own structured output in whatever form with your own simple serializer.

A .NET Dictionary (a collection of KeyValuePairs) must have a unique key for each KeyValuePair: if you are absolutely sure that you'll never have two longitude values that are the same, yes, you can use them as keys. But, what is it that makes you think a dictionary is the right thing in this case ?

fyi: the standard .NET XML serializer cannot handle writing a Dictionary to XML: [^]. I have read that the .NET DataContractSerializer can serialize a Dictionary, but I have not tried this: [^], [^].

Being more confused is not necessarily a bad thing in learning to program, although it may not feel comfortable to be confused. Of course, that's no excuse, if my response confused you !

The goal I had in responding to you was to "point you to" thinking about the "big picture" in your current challenge: what you are really modeling. Thinking in terms of "atoms to molecules to compounds" ... or the reverse ... is just one metaphor for OOP modeling.

There's a lot I can't tell from eye-balling your data: it may be the case that what you really need is to break out the data by Day/Night ... since it appears written that way in the KML fragment you show. Knowing more details is not necessary, however.

I believe if you are clear about what your final goal is, then the design of the data structures you really need will "fall-out" organically: that's a very idealistic statement. In the real-world, it often doesn't work that way: we get "immersed" in the data, and observe patterns of organization in the data, reach conclusions about what variation is in the data, and how that may constrain our solution, and from that we get ideas about how to structure and optimize the data structures we'll create to contain the data.

good luck, Bill

Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview

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 
AnswerRe: Simple cross threading question Pin
Richard MacCutchan6-Oct-13 5:04
mveRichard MacCutchan6-Oct-13 5:04 
Questionget pixel color on image Pin
Member 102255295-Oct-13 4:51
Member 102255295-Oct-13 4:51 
AnswerRe: get pixel color on image Pin
BillWoodruff5-Oct-13 7:22
professionalBillWoodruff5-Oct-13 7:22 
AnswerRe: get pixel color on image Pin
Richard MacCutchan5-Oct-13 20:51
mveRichard MacCutchan5-Oct-13 20:51 
AnswerRe: get pixel color on image Pin
AngloThaiSolutions7-Oct-13 4:01
AngloThaiSolutions7-Oct-13 4:01 
QuestionFocus of the DevExpress DateEdit Pin
nhanlaptrinh3-Oct-13 22:10
nhanlaptrinh3-Oct-13 22:10 
AnswerRe: Focus of the DevExpress DateEdit Pin
Eddy Vluggen4-Oct-13 0:25
professionalEddy Vluggen4-Oct-13 0:25 
QuestionVisual Studio Add-in 2012 Pin
Shankarcodebase3-Oct-13 21:41
Shankarcodebase3-Oct-13 21:41 

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.