Sirs, I have a lot of places in my code where method receives raw user input as string
, then TryParse
s it to actual data type (decimal
, enum
, etc). The object I name by its actual purpose (for example, decimal amount
). But I can't figure what is the best naming convention for raw string
s? rawAmount
? amountString
? amount_raw
? something else? Please let me know what do you think.
Asked
Active
Viewed 100 times
0

Denis
- 3,653
- 4
- 30
- 43
-
1how about inputAmount and actualAmount – Jayanta Dey Feb 12 '15 at 13:45
1 Answers
1
I always go:
string amountStr = GetInput();
double amount = double.Parse(amountStr);

DrKoch
- 9,556
- 2
- 34
- 43