Link to home
Start Free TrialLog in
Avatar of vivekj2004
vivekj2004

asked on

C# array manipulation

I need a string with concatenated "status code" and "reason code".  Both should be concatenated as shown following. If Status code and reason codes are less than 2 characters, they should be left alligned and a space should be left... If they are more than 2 characters, they should be truncated to 2 characters.

Example:
If account has following status reason codes:
Status Code--Reason Code
AA            -- Y
BU             -- CD
B               -- 9

The result string is “AAY BUCDB 9 “
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vivekj2004
vivekj2004

ASKER

Thanks Kaufmed. 100% solution would be to enclose this in a foreach loop to collect all the status codes.