+ 1
Dynamic DataType
Hey everyone! I have made a simple little loop that tries to retrieve the datatype correctly with proofing. That way it won't hurt the program while running, even if a error might emerge. I am curious if there is anything that I can do to improve upon. CODE: https://code.sololearn.com/cq393gv4LmzM/#cs
1 Answer
+ 1
wow that is great code to achieve what you want to achieve with the knowledge you have.
Have a look at the var - datatype
https://www.dotnetperls.com/var
https://www.dotnettricks.com/learn/csharp/c-sharp-var-data-type-and-anonymous-type
And also at TryParse, although that is only working for integers.
https://www.dotnetperls.com/parse