0

Sirs, I have a lot of places in my code where method receives raw user input as string, then TryParses 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 strings? rawAmount? amountString? amount_raw? something else? Please let me know what do you think.

Denis
  • 3,653
  • 4
  • 30
  • 43

1 Answers1

1

I always go:

string amountStr = GetInput();
double amount = double.Parse(amountStr);
DrKoch
  • 9,556
  • 2
  • 34
  • 43