I'm just getting started with OOP and VB, and I have a pretty basic question that I was hoping you could help answer. I am going to be using some physics constants quite often (for instance diameter of the Earth, Earth gravitational constant, etc) and for every program I write I don't want to have create variables for these. What would be the best way to go about doing this?
I was thinking create an Earth class in its own EarthConstants.vb file, and declaring the constants in this class. That way in each program that I am going to be using these constants I could import the EarthConstants.vb file, and use for example Earth.Diameter, Earth.GravitationalConstant, correct?
Would there be a better way to do this, maybe add the Earth class to the VB "library" (I have no idea how to do this) so I wouldn't have to import the Earth.vb every time?
Thanks very much
I was thinking create an Earth class in its own EarthConstants.vb file, and declaring the constants in this class. That way in each program that I am going to be using these constants I could import the EarthConstants.vb file, and use for example Earth.Diameter, Earth.GravitationalConstant, correct?
Would there be a better way to do this, maybe add the Earth class to the VB "library" (I have no idea how to do this) so I wouldn't have to import the Earth.vb every time?
Thanks very much