Link to home
Start Free TrialLog in
Avatar of PeterBaileyUk
PeterBaileyUk

asked on

vb.net and creating a class

I am using visual studio 2015 with sql server providing data.

my client tables are holding clientcodes that represent vehicles with differing amount of data columns and with differing names and data types to represent essentially the same things.

I wonder if it is a good idea to create a vehicle class but not sure what people do when the number of fields are different do I have to have a vehicle class for each client.

I guess you will all have various opinion.

people are asking me why do this and I am guessing that if I do then a set of methods will then exist to get the data and it will be easier to handle.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PeterBaileyUk
PeterBaileyUk

ASKER

Great explanation thank you
do you mean another class for the sub object and that inner class is unique client class
practically I think this is what you meant

User generated image
yes in 1st option, no in second option:
1st option: the classes are inheriting the main class.
2nd option: the main class + 1 single (dynamic) class, holding the data fields as needed per customer.