+ 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

18th Dec 2018, 2:04 PM
Okan Özbek
Okan Özbek - avatar
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
19th Dec 2018, 9:06 AM
sneeze
sneeze - avatar