M
Mike P
I have a class with methods that return an enum value to the main page.
I have the enum declared both in the class and the main page so that I
can read the value that is returned from each class method. Here is the
enum and code calling the class method on the main page. Is this the
right way to go about this (converting the returned value etc) or is
there a more clever way to do it?
public enum VResult
{
Valid = 0,
Invalid = 1
}
....
creditcard ccPackage = new creditcard();
VResult vrValidCardType =
(VResult)ccPackage.Validate_Card_Type(strCardTypePackage);
if (vrValidCardType == VResult.Invalid)
{
//do stuff
}
Thanks,
Mike
I have the enum declared both in the class and the main page so that I
can read the value that is returned from each class method. Here is the
enum and code calling the class method on the main page. Is this the
right way to go about this (converting the returned value etc) or is
there a more clever way to do it?
public enum VResult
{
Valid = 0,
Invalid = 1
}
....
creditcard ccPackage = new creditcard();
VResult vrValidCardType =
(VResult)ccPackage.Validate_Card_Type(strCardTypePackage);
if (vrValidCardType == VResult.Invalid)
{
//do stuff
}
Thanks,
Mike