Here say we have a base enum and we want to assign a vaulue of the string to the base enum it can be done by function "str2enum"
say we have a line od code :
ledgerJournalTrans.AccountType = LedgerJournalACType::Bank;
it means AccountType 's value will be Bank
or else you can do this way also
LedgerJournalACType LedgerJournalACType; //declare this variable in the top
ledgerJournalTrans.AccountType = str2enum(LedgerJournalACType,"Bank");
say we have a line od code :
ledgerJournalTrans.AccountType = LedgerJournalACType::Bank;
it means AccountType 's value will be Bank
or else you can do this way also
LedgerJournalACType LedgerJournalACType; //declare this variable in the top
ledgerJournalTrans.AccountType = str2enum(LedgerJournalACType,"Bank");
No comments:
Post a Comment