Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

How to assign code for every particular digit using c# .net?

I want to assign code like this:-

1-A,
2-C,
3-*,
4-F,
5-&,
6-S,
7-W,
8-B,
9-N,
0-Z

When i type numbers 2500 so it should be display- C&ZZ in label and Grid Field.

and then total of two numbers like that- C&+SB=N* (25+68=93)

Result should be display only code,
result should not be display in digits.


Thanks in Advance.

Ankit Agarwal
Software Engineer
Posted
Updated 22-Mar-15 20:15pm
v2
Comments
George Jonsson 23-Mar-15 2:11am    
Why should anyone give you a solution when you get paid?
At least try some coding first and ask the question when you get stuck.
This is simple enough to solve with a lookup table or similar.

1 solution

Keep mapping table that maps the digit to a character.

Trap the mouse up or mouse down event in your UI and replace the digit with the mapped character.

Do the mathematical operation on the numbers and use the mapping table to display the answer in characters.

Simple stuff
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900