J
James Radke
Hello,
I found some code that I could use in my application on the web, but it is
written in C#, and I would like to convert it to VB. And I am having
problems with one section. Is there anyone that could tell me how to
convert these two things?
1)
[Flags, Serializable]
public enum CardType
{
MasterCard = 0x0001,
VISA = 0x0002,
Amex = 0x0004,
DinersClub = 0x0008,
enRoute = 0x0010,
Discover = 0x0020,
JCB = 0x0040,
Unknown = 0x0080,
All = CardType.Amex | CardType.DinersClub | CardType.Discover |
CardType.Discover |
CardType.enRoute | CardType.JCB | CardType.MasterCard | CardType.VISA
}
I understand how to do the ENUM, but I don't understand what the values are?
They seem like some kind of bit settings and I don't know how to do that.
2.)
if (_cardTypes & CardType.Amex)!=0)
where _cardTypes I believe contains some bitwise combination of the
CardTypes from above.....
Thanks for any help!
Jim
I found some code that I could use in my application on the web, but it is
written in C#, and I would like to convert it to VB. And I am having
problems with one section. Is there anyone that could tell me how to
convert these two things?
1)
[Flags, Serializable]
public enum CardType
{
MasterCard = 0x0001,
VISA = 0x0002,
Amex = 0x0004,
DinersClub = 0x0008,
enRoute = 0x0010,
Discover = 0x0020,
JCB = 0x0040,
Unknown = 0x0080,
All = CardType.Amex | CardType.DinersClub | CardType.Discover |
CardType.Discover |
CardType.enRoute | CardType.JCB | CardType.MasterCard | CardType.VISA
}
I understand how to do the ENUM, but I don't understand what the values are?
They seem like some kind of bit settings and I don't know how to do that.
2.)
if (_cardTypes & CardType.Amex)!=0)
where _cardTypes I believe contains some bitwise combination of the
CardTypes from above.....
Thanks for any help!
Jim