c# - Convert Int List Into Integer -


It's a bit of a weird case that I should accept, but I find a brief and elegant way of converting I'm trying to get a list & lt; Int & gt; For example, if I have 1, 2, and 3 entries in my list, then the final integer will be 123. For example in an actual int I thought about doing so that the only way is to convert the array to string and then parse the string.

Any hint? Repeat the list, such as adding a sum, but the total number of times running in the total is 10 in each step.

  int total = 0; Foreach (entry entry in the list) {total = 10 * total + entry; }  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -