Click here to Skip to main content
16,007,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: Populate TreeView node by clicking item in ListView Pin
Gareth H23-Feb-08 23:14
Gareth H23-Feb-08 23:14 
GeneralRe: Populate TreeView node by clicking item in ListView Pin
MrColeyted24-Feb-08 12:06
MrColeyted24-Feb-08 12:06 
Generalcustom user control Pin
seta_yas23-Feb-08 19:47
seta_yas23-Feb-08 19:47 
QuestionC# Passings Socket references between systems Pin
FASERVER23-Feb-08 15:19
FASERVER23-Feb-08 15:19 
GeneralRe: C# Passings Socket references between systems Pin
Ed.Poore24-Feb-08 7:09
Ed.Poore24-Feb-08 7:09 
GeneralRe: C# Passings Socket references between systems Pin
FASERVER24-Feb-08 14:06
FASERVER24-Feb-08 14:06 
GeneralRe: C# Passings Socket references between systems Pin
Ed.Poore24-Feb-08 15:25
Ed.Poore24-Feb-08 15:25 
GeneralMoving from FoxPro to C# - confusion and Data Structure Questions. Pin
Jammer23-Feb-08 13:19
Jammer23-Feb-08 13:19 
Hi All,

What a great place this is!!!

I’m pretty new to .NET and fairly new to true OOP in general really. I’ve recently made the decision to move the development of an app I’m working on from FoxPro (which I know fairly well) to .NET & C# and I have some questions before I start moving this new version of the project forward.

To give some back ground on the FoxPro version. It basically scans the entire directory structure of the host machine (logical drives C:\, D:\ etc …) for files with certain file extensions and builds a database of them for sorting and querying. It extracts information about each file and stores that as well. All pretty basic stuff really and due to FoxPro being a database language its fairly dictated as to how this data is structured and stored … i.e – Its in tables in a Database.

The problem …

Now that I’m moving this over to the .NET framework (into a WPF App in fact) I have a stack of questions about how I should structure this data.

The recursion is easy using the built in classes DirectoryInfo and FileInfo etc … the question I have is how do you recommend I structure and store the results? The obvious one to me is in an array but I’m sure there is a better way. This is where I’m sure a few of you will laugh. I’m still a bit confused about what I can actually do with Objects which is why I’m here. I want to get this right from the get go. Avoiding anything boxing etc …

Would you create one object with parameters like (for argument sake):

public file
{
public Directoy
public FileName
public FileSize
public Extension
public Date
}

If so how would you add many entries (the equivalent to FoxPro records) to that one instance of an object?

Or would you create an array of objects that each in turn hold the required details about just one file? Or something along the lines of a DataTable maybe?

I think some of the source of my confusion is that I also need to persist this data on the host machine once its built from the directory structure by serializing the object(s) to disk. Can you even do that with an array of objects?

Anyway, I think that’s enough for now, I’m sure that any and all responses will generate more questions from me. Thanks for any input / direction / code examples.
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Christian Graus23-Feb-08 13:23
protectorChristian Graus23-Feb-08 13:23 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Jammer23-Feb-08 13:34
Jammer23-Feb-08 13:34 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Christian Graus23-Feb-08 13:54
protectorChristian Graus23-Feb-08 13:54 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Jammer23-Feb-08 14:10
Jammer23-Feb-08 14:10 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Christian Graus23-Feb-08 14:29
protectorChristian Graus23-Feb-08 14:29 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Jammer23-Feb-08 14:39
Jammer23-Feb-08 14:39 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Christian Graus23-Feb-08 14:41
protectorChristian Graus23-Feb-08 14:41 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Jammer23-Feb-08 15:01
Jammer23-Feb-08 15:01 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Christian Graus23-Feb-08 15:12
protectorChristian Graus23-Feb-08 15:12 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Jammer23-Feb-08 15:26
Jammer23-Feb-08 15:26 
GeneralRe: Moving from FoxPro to C# - confusion and Data Structure Questions. Pin
Christian Graus23-Feb-08 15:36
protectorChristian Graus23-Feb-08 15:36 
GeneralClass Tips [modified] Pin
MasterSharp23-Feb-08 11:14
MasterSharp23-Feb-08 11:14 
GeneralRe: Class Tips Pin
Christian Graus23-Feb-08 12:03
protectorChristian Graus23-Feb-08 12:03 
GeneralRe: Class Tips Pin
MasterSharp23-Feb-08 13:55
MasterSharp23-Feb-08 13:55 
GeneralRe: Class Tips Pin
MasterSharp23-Feb-08 13:56
MasterSharp23-Feb-08 13:56 
QuestionCreate picture of Form Pin
JankoH23-Feb-08 10:58
JankoH23-Feb-08 10:58 
GeneralRe: Create picture of Form Pin
Expert Coming23-Feb-08 11:10
Expert Coming23-Feb-08 11:10 

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.