Click here to Skip to main content
15,887,822 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to set label text here? Pin
OriginalGriff27-Jul-12 9:16
mveOriginalGriff27-Jul-12 9:16 
GeneralRe: how to set label text here? Pin
Ravi Bhavnani27-Jul-12 9:41
professionalRavi Bhavnani27-Jul-12 9:41 
GeneralRe: how to set label text here? Pin
OriginalGriff27-Jul-12 9:47
mveOriginalGriff27-Jul-12 9:47 
QuestionTrack two types of values within one variable Pin
hpjchobbes27-Jul-12 4:55
hpjchobbes27-Jul-12 4:55 
AnswerRe: Track two types of values within one variable Pin
SledgeHammer0127-Jul-12 6:28
SledgeHammer0127-Jul-12 6:28 
GeneralRe: Track two types of values within one variable Pin
hpjchobbes27-Jul-12 7:04
hpjchobbes27-Jul-12 7:04 
GeneralMessage Removed Pin
27-Jul-12 6:38
professionalN_tro_P27-Jul-12 6:38 
GeneralRe: Track two types of values within one variable Pin
hpjchobbes27-Jul-12 7:18
hpjchobbes27-Jul-12 7:18 
Thanks for responding!

I haven't really gotten to learning a lot about interfaces (or abstract classes), but I am thinking that will be the next topic I tackle.

The reason for this setup is because I am interacting with another software, and that software has one value that represents either a dollar value or a percentage. For example, this is how it would show a transaction:
Widget          $12.00
Shipping        $3.95
Subtotal        $15.95
Tax             8.875%
Total           $30.11


When I get this information from the program, they have a rate class that contains three members, an enum for the price type (dollar or percent), a double for the Dollar value, and a double for the Percent value. Because the line can only be a dollar or value and not both, one of the doubles will always be null.

I get the feeling (but I may be wrong) that they way they did their setup isn't the best. I will probably implement a Rate class that contains an enum and a double, which should work, but if there is a 'better' way to do this, I would prefer to learn about that type of implementation.
GeneralRe: Track two types of values within one variable Pin
BillWoodruff29-Jul-12 18:35
professionalBillWoodruff29-Jul-12 18:35 
GeneralRe: Track two types of values within one variable Pin
SledgeHammer0127-Jul-12 11:40
SledgeHammer0127-Jul-12 11:40 
GeneralMessage Removed Pin
27-Jul-12 12:22
professionalN_tro_P27-Jul-12 12:22 
GeneralRe: Track two types of values within one variable Pin
SledgeHammer0127-Jul-12 12:33
SledgeHammer0127-Jul-12 12:33 
AnswerRe: Track two types of values within one variable Pin
Eddy Vluggen27-Jul-12 7:13
professionalEddy Vluggen27-Jul-12 7:13 
GeneralRe: Track two types of values within one variable Pin
hpjchobbes27-Jul-12 7:23
hpjchobbes27-Jul-12 7:23 
GeneralRe: Track two types of values within one variable Pin
Eddy Vluggen27-Jul-12 8:24
professionalEddy Vluggen27-Jul-12 8:24 
GeneralRe: Track two types of values within one variable Pin
PIEBALDconsult27-Jul-12 8:15
mvePIEBALDconsult27-Jul-12 8:15 
AnswerRe: Track two types of values within one variable Pin
SledgeHammer0127-Jul-12 11:45
SledgeHammer0127-Jul-12 11:45 
GeneralRe: Track two types of values within one variable Pin
jschell27-Jul-12 11:57
jschell27-Jul-12 11:57 
GeneralRe: Track two types of values within one variable Pin
Paul Conrad28-Jul-12 9:31
professionalPaul Conrad28-Jul-12 9:31 
GeneralMessage Removed Pin
27-Jul-12 12:24
professionalN_tro_P27-Jul-12 12:24 
GeneralRe: Track two types of values within one variable Pin
SledgeHammer0127-Jul-12 12:36
SledgeHammer0127-Jul-12 12:36 
GeneralMessage Removed Pin
27-Jul-12 13:52
professionalN_tro_P27-Jul-12 13:52 
GeneralRe: Track two types of values within one variable Pin
jschell28-Jul-12 6:33
jschell28-Jul-12 6:33 
AnswerRe: Track two types of values within one variable Pin
Trak4Net27-Jul-12 18:26
Trak4Net27-Jul-12 18:26 
GeneralRe: Track two types of values within one variable Pin
Paul Conrad28-Jul-12 9:32
professionalPaul Conrad28-Jul-12 9:32 

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.