0 Replies - 1046 Views - Last Post: 16 June 2012 - 01:10 PM Rate Topic: -----

#1 racidon  Icon User is offline

  • D.I.C Head

Reputation: 59
  • View blog
  • Posts: 172
  • Joined: 27-August 11

Class object as DataSet

Posted 16 June 2012 - 01:10 PM

Hi guys,

Not sure if a dataset is the best way to go about this (if not tell me so and why) but I have a class with the following code:

public class UniItemtype
    {
        #region Field Region

        //Declare variables
        private Dictionary<uint, UniItemData>
            _items;

        #endregion

        ............
    }



UniItemData looks like this:
public class UniItemData
    {
        public const int
            NAMESTRINGSIZE = 16,
            DESCRIPTIONSTRINGSIZE = 128;

        #region Field Region

        //Declare variables
        private Dictionary<string, Field>
            _fields;
        private List<UnknownBlock>
            _unknownBlock;

        #endregion

        .......................
        }



Then Field looks like this:
public class Field
    {
        #region Field Region

        //Declare variables
        private string
            _name;
        private object
            _value;
        private int
            _length;

        #endregion

        .....................
      }




So basically my goal is to have a way to edit all these fields, and since there is no set number or name of fields, just what the user ends up loading into these I was wondering would it be best to just create textboxes and labels for each of these and then have a list box of each "UniItemData" entry in the UniItemtype?
Or should I make a dataset and have it display a database style of UniItemData?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1